develooper Front page | perl.fwp | Postings from January 2002

Re: even.pl solutions

Thread Previous | Thread Next
From:
Stephen Turner
Date:
January 29, 2002 03:38
Subject:
Re: even.pl solutions
Message ID:
Pine.LNX.3.96.1020129113535.2986A-100000@gentoo
Five programs didn't use $. , of which the shortest is this one from Ton
Hospel in equal third place:

-ln ($a=aeiouy)=~s!!--&~y-!g;eval"\$|$a--c&&print"          50 ton

It's another meta-program. The line counting is done by $|-- , although even
that isn't obvious until you've worked out what $a is above.

-- 
Stephen Turner, Cambridge, UK    http://homepage.ntlworld.com/adelie/stephen/
"This is Henman's 8th Wimbledon, and he's only lost 7 matches." BBC, 2/Jul/01





Thread Previous | 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