Re: How can i make a perl program lauch another perl program that takes options
- From: chas.owens@xxxxxxxxx (Chas Owens)
- Date: Fri, 29 Jun 2007 11:57:49 -0400
On 6/29/07, Alex Jamestin <alex.jamestin@xxxxxxxxx> 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") == 0snip
or die "perl blew up: $!";
Same thing here.
snip
And the o/p got is -snip
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.
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);
.
- References:
- How can i make a perl program lauch another perl program that takes options
- From: Alex.Jamestin+Usenet@xxxxxxxxx
- Re: How can i make a perl program lauch another perl program that takes options
- From: Chas Owens
- Re: How can i make a perl program lauch another perl program that takes options
- From: Alex Jamestin
- Re: How can i make a perl program lauch another perl program that takes options
- From: Chas Owens
- Re: How can i make a perl program lauch another perl program that takes options
- From: Alex Jamestin
- Re: How can i make a perl program lauch another perl program that takes options
- From: Chas Owens
- Re: How can i make a perl program lauch another perl program that takes options
- From: Alex Jamestin
- Re: How can i make a perl program lauch another perl program that takes options
- From: Alex Jamestin
- How can i make a perl program lauch another perl program that takes options
- Prev by Date: how to get references from imbricated capturing parenthesis ?
- Next by Date: Re: CPU/Memory usage of a process on Windows machine
- Previous by thread: Re: How can i make a perl program lauch another perl program that takes options
- Next by thread: Re: How can i make a perl program lauch another perl program that takes options
- Index(es):
Relevant Pages
|
|