Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 musing on the Monastery: (3)
As of 2016-09-25 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (464 votes). Check out past polls.