Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 meditating upon the Monastery: (15)
As of 2015-07-31 15:04 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 (278 votes), past polls