32 lines
762 B
Perl
Executable File
32 lines
762 B
Perl
Executable File
#! /usr/bin/env perl
|
|
|
|
use locale;
|
|
use strict;
|
|
|
|
##################################################
|
|
# Skrypt transformuje s³ownik u¿ytkownika #
|
|
# do s³ownika rozumianego przez gue. #
|
|
# Format wej¶ciowy: #
|
|
# pref*kon~waga;opis #
|
|
# Format wyj¶ciowy: #
|
|
# nok_pref~waga;opis #
|
|
# #
|
|
# Prefiks mo¿e byæ pusty, koñcówka te¿ #
|
|
##################################################
|
|
|
|
while (<>) {
|
|
/^(\w*)\*(\w*)(~.*)$/;
|
|
my $pref = $1;
|
|
my $kon = $2;
|
|
my $desc = $3;
|
|
|
|
print reverse(split("",$kon));
|
|
|
|
if ($pref != "") {
|
|
print "_$pref";
|
|
}
|
|
print "$desc\n";
|
|
|
|
|
|
}
|