develooper Front page | perl.golf | Postings from July 2002

Golf this.

Thread Next
From:
Tor Hildrum
Date:
July 15, 2002 22:50
Subject:
Golf this.
Message ID:
B959809A.CCC9%torhildr@mac.com
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. 

Tor


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About