[Chicago-talk] testing exit status of external program

Dooley, Michael Dooley.Michael at con-way.com
Tue Dec 9 10:13:43 CST 2003

If I have a program like below how can I test the return value of the
external program?

open (FILE, "./test.file");
open (ES_CLIENT, "|shell_program");
while (<FILE>) {
print ES_CLIENT $_;"\n";
close (ES_CLIENT);
close (FILE);

[qgatu003]/export/home/mxdooley/mbi_script$cat test.file |shell_program
16:06:32: info: broker_path=qgatu003
16:06:32: warning: connect= (Connection refused, tcp)
16:06:33: warning: broker_malfunction=
(reason=no_broker_reply, service=brokerService)
16:07:02: fatal: unable_to_resolve_or_connect_to_sclient=ES_MSGIN_RR

[qgatu003]/export/home/mxdooley/mbi_script$print $?

More information about the Chicago-talk mailing list