
18.10.2006, 15:37
|
|
Green member
Регистрация: 28.12.2005
Сообщений: 376
Провел на форуме: 5559831
Репутация:
1833
|
|
PHP код:
#!/usr/bin/perl
use strict;
my %words;
while (my $nextdic = shift)
{
open(FILE, "< $nextdic") or print(STDERR "Not Found $nextdic\n") && next;
print STDERR "Cleaning $nextdic\n";
while (<FILE>)
{
chomp;
s/ +//g;
$words{$_} = ""
}
}
print "$_\n" for (sort keys %words)
запускать так :
c:\slo.pl 1.txt > 2.txt
или
c:\slo.pl 1.txt 2.txt 3.txt и т д > 2.txt
Скрипт должен лежать в папке со словарями ибо так удобней.
|
|
|