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



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 Owens <chas.owens@xxxxxxxxx> wrote:
On 6/29/07, Alex Jamestin <alex.jamestin@xxxxxxxxx> 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 thinking about this :))
> Oh well, Bug begets bug :)
>
> Anyways,
> thx again for helping out
> Alex
>

I don't think the problem is in vplan_all.pl. I looked back at your
original code and noticed a bug:
system( "perl vplan_all.pl 5.6 24.0")
or die "Couldn't run the vplan_all.pl script: $!\n";

This should be

system( "perl vplan_all.pl 5.6 24.0") == 0
or die "Couldn't run the vplan_all.pl script: $!\n";

.



Relevant Pages

  • Re: bug in perl
    ... > sleep 1; ... > # in the second example perl appears to be sleeping before executing ... bug ever!!! ... actually be missing something? ...
    (comp.lang.perl.misc)
  • float bug? perl 5.8, DBI and oracle 10.2.0
    ... I am having trouble with a tricky little beast that smells like a bug, ... I noticed this problem while upgrading a large software from perl 5.6.2 to ... I still don't know where to locate the bug. ... using an integer value instead of a float. ...
    (perl.dbi.users)
  • Re: trying to understand fork and wait
    ... > the perldoc for fork ... ... die had nothing to do with your problem. ... off checking whether functions fail: ... Unfortunately there is no one way to test for 'success' in Perl. ...
    (comp.lang.perl.misc)
  • Re: Perl qx// broken with OpenVMS 8.x
    ... This is perl, v5.8.6 built for VMS_AXP ... I'm looking for information about the qx// bug being logged and a time ... The qx operator is a special quoting operator that spawns a command to ... script suppresses error messages and does not do any error checking, ...
    (comp.os.vms)
  • Re: Looking for a critique
    ... S> Uri Guttman wrote: ... S> Much of my code was borrowed from recipe 12.2 of O'Reilly's "Perl ... S> "die unless" idioms, but in this case I wanted to emphasize the fact ... getting burned with reused here doc tokens, that is more a lesson for ...
    (comp.lang.perl.misc)