Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: readdir and while - magic?

by jmcnamara (Monsignor)
on Jan 03, 2003 at 15:28 UTC ( [id://224043]=note: print w/replies, xml ) Need Help??


in reply to readdir and while - magic?


perl adds a defined to the while so you get something like this:
$ perl -MO=Deparse -e 'while($file = readdir(D)) { print $file; }' while (defined($file = readdir D)) { print $file; } -e syntax OK

This is explained in more detail at A most obscure bug.

--
John.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://224043]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found