Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: greater efficiency required (ls, glob, or readdir?)

by jethro (Monsignor)
on Aug 27, 2008 at 18:19 UTC ( [id://707245]=note: print w/replies, xml ) Need Help??


in reply to greater efficiency required (ls, glob, or readdir?)

|| !$_ is possibly unsafe, you would ignore a file named '0'

Also usually 'or' is better than '||' because of lower precedence (doesn't make a difference here though)

Replies are listed 'Best First'.
Re^2: greater efficiency required (ls, glob, or readdir?)
by ikegami (Patriarch) on Aug 27, 2008 at 18:48 UTC

    || !length($_) (Upd: or better yet || !/\S/ ) would be the solution.

    || is fine. It's being used to join expressions, not statements.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found