Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: forcing list-context

by Arunbear (Parson)
on Jan 23, 2012 at 17:31 UTC ( #949468=note: print w/ replies, xml ) Need Help??


in reply to forcing list-context

Another way is to unload the readdir call into a temporary array and then call scalar on that e.g.

say scalar(@{[readdir $dh]});
Though this is not as economical (memory wise) as the above solution in Re: forcing list-context


Comment on Re: forcing list-context
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2014-08-22 11:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (156 votes), past polls