On 6/29/07, Alex Jamestin <[EMAIL PROTECTED]> wrote:
snip
my $vplan_parent_path = "\/pdd\/qes\/vsuites\/vplan";
snip

You don't need to escape those slashes.

snip
system("perl $vplan_parent_path\/vplan_all.pl") == 0
   or die "perl blew up: $!";
snip

Same thing here.

snip
And the o/p got is -

vp_all: USAGE: perl vplan_all.pl <Version> <Build> <File_name_to_be_created>

perl blew up: No such file or directory at test2.pl line 8.


Interesting thing is, while perl locates the second perl prog
successfully - it still calls die after that.
snip

You said before that it was supposed to die if it got no arguments, so
that is the expected behaviour.  As to why it keeps saying "No such
file or directory", well, if I remember correctly $! is the system
call errno, not the return from system.  I think you want $?
(specifically $? >> 8).  Here is what I think you want

system("perl vplan_all.pl 5.6 24.0 ajtest") == 0
   or die "vplan_all failed with an exit code of " . ($? >> 8);

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to