#!/usr/local/bin/perl
$body = '';
$dicfile = "dic.txt"; #ソートするファイル
$dicfile1 = "dic1.txt"; #出力するファイル
$uniq = `uniq $dicfile` || &error('コマンドエラー','uniqが使えないっす.');
@dic = split ("\n",$uniq);
@dic = sort(@dic);
print "Content-type: text/html\n\n";
print "sort&uniq\n";
print "$body\n";
open(QQ,">$dicfile1");
for(@dic){
print QQ "$_\n";
print "$_\n";
}
# $num = @dic; print "\n$num\n";
print "end";
close(QQ);
print "
";
exit;
sub error {
print "Content-type: text/html\n\n";
print "えら〜\n";
print "$body$_[0]
$_[1]