[HoustonTx.pm] Golf (was Re:Perl/Unix)

houston at mail.pm.org houston at mail.pm.org
Thu Aug 7 18:25:09 CDT 2003


> perl -0e'$_=<>'

Very nice! (shaved one off there, eh!)

I completely forgot about -0 (where's perldoc, oh YEAH - there's perldoc =)

Oh, wait, wait, this leads us to... here we go:

perl -0ne''

(spoiler: it _does_ meet the rules of the challenge, as it does assign the
entire contents of a file to a variable =)

!chris

===================================
Discreet Packaging: www.dronecolony.com
C. Church
===================================





More information about the Houston mailing list