Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 scrutinizing the Monastery: (8)
As of 2015-07-08 03:11 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 (93 votes), past polls