maybe you could capture the output with backticks instead of system():

$retcode = `$command`;

and parse $retcode for different responses, so your script can then behave
accordingly. of course, you would need to know what the responses are ahead
of time.



> -----Original Message-----
> From: qwertu [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 7:06 AM
> To: [EMAIL PROTECTED]
> Subject: [analog-help] return code
> 
> 
> Hello,
> 
> I'm using analog 4.13 on a SuSE Linux 7.0 system.
> I'm starting analog out of a perl script wich provides all parameters.
> e.g.:
> ----
> $command = "analog ....";
> $retcode = system($command);
> print $retcode;       # print return code on screen
> ----
> If analog ends successfully the return code is 0. If analog 
> can't find the 
> dns.txt or the logfile a warning is printed on screen, but 
> the return code 
> remains 0. Is there a way to get different return codes for 
> each case (e.g. 
> no logfile, no dns.txt, etc.)?
> 
> Hope, my bad english makes sense for you all!
> 
> Yours
> 
> Christian Teufel
> 
> 
> --------------------------------------------------------------
> ----------
> This is the analog-help mailing list. To unsubscribe from this
> mailing list, send mail to [EMAIL PROTECTED]
> with "unsubscribe" in the main BODY OF THE MESSAGE.
> List archived at 
http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------

Reply via email to