F
Fearban
Hi,
I am calling a perl script. This perl script will exit(9) when finished
processing.
I am calling this script from a borne shell script. I need to catch the
return value.
The following is a simple example.
But i can not catch the "9"
perltest.pl
#!/opt/bin/perl
print("hello\n");
exit 9;
here is the shell script
#!/bin/ksh
var=`perl perltest.pl`
print ${var}
Also how is this done if perl is the calling script.
#!/opt/bin/perl
my $var = 8;
print("$var\n");
$var= system(perl perltest.pl);
print ($var);
Can any one help.?
I am calling a perl script. This perl script will exit(9) when finished
processing.
I am calling this script from a borne shell script. I need to catch the
return value.
The following is a simple example.
But i can not catch the "9"
perltest.pl
#!/opt/bin/perl
print("hello\n");
exit 9;
here is the shell script
#!/bin/ksh
var=`perl perltest.pl`
print ${var}
Also how is this done if perl is the calling script.
#!/opt/bin/perl
my $var = 8;
print("$var\n");
$var= system(perl perltest.pl);
print ($var);
Can any one help.?