Usually you do this by returning a 0 if the sub fails or any other value if
it is successful.  

Simple Example:

if(lookforfolder()){
   print "It's there!\n";
}else{
   print "Folder not found\n";
}

sub lookforfolder{
   if(-d "/home/me"){
      return 1;
   }else{
      return 0;
} 



-----Original Message-----
From: loan tran [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 8:09 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: How to check if the job is failure or successful in sub1 before
calling sub2


Hello all,

Can somebody throw some light on this.

1. How to capture errors from the output running a
perl script. 
2. How to check if the job is failure or successful in
sub1 before calling sub2. 


Thanks


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to