Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://567825]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-23 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found