Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: unlink $file OR... OR..

by Prof Vince (Friar)
on Aug 30, 2007 at 13:58 UTC ( #636082=note: print w/ replies, xml ) Need Help??


in reply to unlink $file OR... OR..

For the sake of completeness, you can also use an anonymous sub :

unlink $file or sub { print 'Error!'; push @list, $file; }->();
Using unless or a do block would be the preferred way though.
Also, don't call subs with & unless you've read perlsub and you've understood what it does.


Comment on Re: unlink $file OR... OR..
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-09-01 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls