Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2016-02-08 03:18 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (266 votes), past polls