Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 examining the Monastery: (4)
As of 2014-08-30 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls