En op 16 juli 2002 sprak Tor Hildrum:
>I was considering starting a first ever newbie golf hole,
> but I chickened out.
>
> I would still like some help with golfing my solution down a couple of
> strokes. It's pretty trivial:
>
> open F,$_[0];while(<F>){$h{$_}=$i;}foreach$k(%h){print"$k";}'
>
> It's basically just supposed to copy the 'sort -u' function.
> I'm pretty satisfied with it, but I'm pretty sure there is another
(better)
> algorithm. 

Yours removes duplicates but does not sort.
How about this?

#!perl -p
$h{$_}=""}for(sort%h){

/-\

Reply via email to