Hello Friends,
How to get a return value from a symbolic linked perl program?
I have a .pl that calls another perl program but thru the symobic link that has some usr/passwd encryption process. The return value from the called .pl (thru the symbolic link) is coming as "0" all the time no matter if it has to error out and come as some error code 256.
Below is a section of code:
CODE
#...program1.pl...
# ...
my $returncode = system(" $script_path/common/runessmxl.pl $script_path $script_name $execute_script
$scenario $dir $app $db $email_group ");
print "run exec return code: $returncode\n";
if ( $returncode != 0 ) {
print "run exec err out\n";
Error_Routine();
} else {
print "run success exec\n";
# runessmxl.pl is a symbolic link created on runessmxl_real.pl
# the return value from runessmxl_real.pl is not getting over to program1.pl always return as 0 instead of an error value code 256...
CODE
#...runessmxl_real.pl
#...
open(PROG, "| perl $script_path_Dir/$execute_script $script_path $parent_script $scenario $dir $app $db $calcstmo $calcendmo $calcyr ");
print PROG "$strUserName\n";
print PROG "$strPassword\n";
close(PROG);
if ( $? != 0 ) {
# system(" perl $script_path/common/error_routine.pl $script_path $script_name $message " );
print "error runess\n";
return exit 1;
}
Appreciate any help on this....Thank you!!
This post has been edited by siniks: 13 May, 2008 - 01:49 PM