help
Rev | Line | |
---|
[f1563c0] | 1 | #! /usr/bin/env perl |
---|
| 2 | |
---|
| 3 | use locale; |
---|
| 4 | use strict; |
---|
| 5 | |
---|
| 6 | ################################################## |
---|
| 7 | # Skrypt transformuje s³ownik u¿ytkownika # |
---|
| 8 | # do s³ownika rozumianego przez gue. # |
---|
| 9 | # Format wej¶ciowy: # |
---|
| 10 | # pref*kon~waga;opis # |
---|
| 11 | # Format wyj¶ciowy: # |
---|
| 12 | # nok_pref~waga;opis # |
---|
| 13 | # # |
---|
| 14 | # Prefiks mo¿e byæ pusty, koñcówka te¿ # |
---|
| 15 | ################################################## |
---|
| 16 | |
---|
| 17 | while (<>) { |
---|
| 18 | /^(\w*)\*(\w*)(~.*)$/; |
---|
| 19 | my $pref = $1; |
---|
| 20 | my $kon = $2; |
---|
| 21 | my $desc = $3; |
---|
| 22 | |
---|
| 23 | print reverse(split("",$kon)); |
---|
| 24 | |
---|
| 25 | if ($pref != "") { |
---|
| 26 | print "_$pref"; |
---|
| 27 | } |
---|
| 28 | print "$desc\n"; |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.