Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: or with a block

by maverick (Curate)
on May 31, 2002 at 18:42 UTC ( #170803=note: print w/ replies, xml ) Need Help??


in reply to or with a block

I tend to do it like this:

unless(opendir(CLEANPATH,"$path")) { warn "$path: $!\n"; next; }
It reads kinda nicely. "unless we can open the directory, yell"

Some people might dislike that technique since the evalaution of the conditional has a side effect (that the directory is opened)...but I think it'd like it better than the right hand side of an inlined 'or' having one... ;)

/\/\averick
OmG! They killed tilly! You *bleep*!!


Comment on Re: or with a block
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2015-07-02 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (29 votes), past polls