Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Tom Phoenix
On 6/29/07, Alex Jamestin <[EMAIL PROTECTED]> wrote: Well, i tried both the options - > system("perl vplan_all.pl", "5.6", "24.0") == 0 > or die "blah"; > > or > > system( "perl", "vplan_all.pl", "5.6", "24.0") == 0 > or die "blah"; I think when perl -> shell -> perl . Here perl doe

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Alex Jamestin
Tried that but it still won't work. Doh! Stupid bug :\ I'd run this test script below - #! /usr/bin/perl use strict; use warnings; my $vplan_parent_path = "\/pdd\/qes\/vsuites\/vplan"; system("perl $vplan_parent_path\/vplan_all.pl") == 0 or die "perl blew up: $!"; And the o/p got is - vp

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Alex Jamestin
Thanks Chas, This does work. So there's no problem with perl itself. I guess now, i'll have to take a look at vplan_all.pl. The sucky thing is that road is too much of pain to go down. (Though now i don't think ill be able to sleep without thinking about this :)) Oh well, Bug begets bug :) Anywa

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Alex Jamestin
Okay, system returns a 0 if it executes successfully. So then, die is called only if system returns anything other than a 0. And in the old code system would return a 0 after calling perl. This would short-circuit and call die. Makes sense :) Will try out and reply. Thx, Alex On 6/29/07, Chas

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Alex Jamestin
Well, i tried both the options - system("perl vplan_all.pl", "5.6", "24.0") == 0 or die "blah"; or system( "perl", "vplan_all.pl", "5.6", "24.0") == 0 or die "blah"; I think when perl -> shell -> perl . Here perl doesn't seem to understand that vplan_all.pl is the script name and

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Chas Owens
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 i

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Chas Owens
On 6/29/07, Alex Jamestin <[EMAIL PROTECTED]> wrote: Thanks Chas, This does work. So there's no problem with perl itself. I guess now, i'll have to take a look at vplan_all.pl. The sucky thing is that road is too much of pain to go down. (Though now i don't think ill be able to sleep without thi

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Chas Owens
On 6/29/07, Alex Jamestin <[EMAIL PROTECTED]> wrote: Sorry forgot about that.. I'm running it on FreeBSD/i386 accessed via. a terminal prog. I have a FreeBSD box handy, but I cannot reproduce your error. Do the two scripts below work for you? /home/cowens>uname -smr FreeBSD 4.11-STABLE i386 /

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Chas Owens
> Hmm, what OS are you using? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Chas Owens
On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: snip I've tried bypassing the shell [ system(xxx,xxx,xx)] but that doesn't seem to help. snip Hmm, what OS are you using? And by system(xxx,xxx,xx) do you mean system("perl vplan_all.pl", "5.6", "24.0") == 0 or die "blah"; or syst

Re: How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread Steve Bertrand
[EMAIL PROTECTED] wrote: > Hi all, > > Any help on this would be appreciated :) > > Currently I have a perl program thats required to call another perl > program. The second one takes arguments and can be called as: > > perl vplan_all.pl 5.6 24.0 ajtest > > Here 5.6, 24.0 and ajtest

How can i make a perl program lauch another perl program that takes options

2007-06-29 Thread [EMAIL PROTECTED]
Hi all, Any help on this would be appreciated :) Currently I have a perl program thats required to call another perl program. The second one takes arguments and can be called as: perl vplan_all.pl 5.6 24.0 ajtest Here 5.6, 24.0 and ajtest are all command line options. I have to cal