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

Re: Fun with open() on a string

Thread Previous | Thread Next
Mark Mielke
July 29, 2008 06:42
Re: Fun with open() on a string
Message ID:
Peter Scott wrote:
> 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.

+1 for weird. :-)

Do you have an explanation for why it does what it does? :-)


Mark Mielke <>

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