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

Re: backticks spits out error, but I want to handle errors! *shakes fist*

by greenFox (Vicar)
on Aug 17, 2006 at 03:26 UTC ( #567825=note: print w/ replies, xml ) Need Help??


in reply to backticks spits out error, but I want to handle errors! *shakes fist*

Check $? (perlvar). Something like:

foreach $spamuser (@users) { my $CUR_INBOX = "$MAIL_ROOT/$spamuser/cur"; @ham = `find $CUR_INBOX -type f 2>&1`; $? and die "@ham $!"; }

--
Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho


Comment on Re: backticks spits out error, but I want to handle errors! *shakes fist*
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-08-27 17:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (247 votes), past polls