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

Join 119,726 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,408 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! 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
post 13 May, 2008 - 01: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 - 01:49 PM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/15/08 04:09PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month