I have a UNIX ksh script with multiple steps that calls a Perl script in one of the middle steps.
When the Perl script executes and dies because of some error condition in the Perl script how do I pass a value back to my UNIX ksh script so my ksh script knows to abend?
I guess I'm not clear on what return code die uses when it executes. My perl code is:
my $usage="Usage: $0 <DATECARD> <FILE1IN> <FILE1OUT> $!\n";
@ARGV == 3 or die $usage;
Unix ksh code
perlscript.pl $file1 $file2 $file3
This echos "0"