<[EMAIL PROTECTED]> wrote:
>> open F,$_[0];while(<F>){$h{$_}=$i;}foreach$k(%h){print"$k";}
^^^^^
Should be $ARGV[0]
> Yours removes duplicates but does not sort.
> How about this?
>
> #!perl -p
> $h{$_}=""}for(sort%h){
Ah. :)
{$h{$_}=""}for(sort%h){print}
Gives an additional newline at the start though.
But, is this the shortest algorithm? Using a hash?
29 strokes?
Tor
