Welcome to Dream.In.Code
Getting Help is Easy!

Join 135,948 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,708 people online right now. Registration is fast and FREE... Join Now!




Return value from symbolic linked perl program

 
Reply to this topicStart new topic

Return value from symbolic linked perl program

siniks
13 May, 2008 - 12:44 PM
Post #1

New D.I.C Head
*

Joined: 30 Apr, 2008
Posts: 4

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 - 12:49 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 08:57AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month