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