develooper Front page | perl.perl5.porters | Postings from July 2008

Fun with open() on a string

Thread Next
From:
Peter Scott
Date:
July 29, 2008 03:10
Subject:
Fun with open() on a string
Message ID:
pan.2008.07.29.10.10.32.609047@PSDT.com
This very nearly qualifies as an easter egg.  Inspect the following:

    perl -e 'close STDIN; open STDIN, "<", \$x; print <>'

Guess what it does.  Run it.  See if you were right.

Bugworthy?  I don't know; maybe, that's why I mention it here.  But it had
some entertainment value for me today.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/


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