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

Re: solutions

Thread Previous | Thread Next
Stephen Turner
January 29, 2002 03:38
Re: solutions
Message ID:
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
"This is Henman's 8th Wimbledon, and he's only lost 7 matches." BBC, 2/Jul/01

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About