Oct 15, 2004 #1 tlm153 Programmer Joined Jun 13, 2003 Messages 9 Location 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}
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}
Oct 15, 2004 #2 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR 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 Upvote 0 Downvote
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
Oct 15, 2004 #3 Chacalinc Vendor Joined Sep 2, 2003 Messages 2,043 Location US as PHV states, $? will have the return code of the last command issued, example: mount /some_dev /some_mnt_point echo $? cheers. Upvote 0 Downvote
as PHV states, $? will have the return code of the last command issued, example: mount /some_dev /some_mnt_point echo $? cheers.
Oct 16, 2004 #4 MikeLacey MIS Joined Nov 9, 1998 Messages 13,212 Location GB 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 Upvote 0 Downvote
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