Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return Code from Perl

Status
Not open for further replies.

tlm153

Programmer
Jun 13, 2003
9
0
0
US
I have to call a Perl script (doing FTP), how do I check the return code in my Unix script when I return from Perl?

echo Check for file on ftp server.

${Perl}newftpGetSsg.pl ${ftpPrms[*]} ${AplTrgr}

 
What about the $? builtin ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
as PHV states, $? will have the return code of the last command issued, example:

mount /some_dev /some_mnt_point
echo $?

cheers.
 
tlm - use the exit() command in your perl script

exit(1)

will return an exit code of 1 when you call your perl script

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top