Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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.

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 meditating upon the Monastery: (13)
As of 2016-06-28 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (360 votes). Check out past polls.