llancet has asked for the wisdom of the Perl Monks concerning the following question:

I am making a glue perl script, inside that several other perl scripts are called. In some cases, end users may run the glue script using some perl interpreter other than the "default" one in /usr/bin/perl, so it would better to call child scripts using the user-wanted interpreter:
# in my glue script # got the location of current interpreter my $curr_perl; system($curr_perl,'ugly_script.pl',@lots_of_args)==0 or die "Ouch!!"; system($curr_perl,'another_script.pl',@ugly_args)==0 or die "Oops!!";
I believe there must be a perl variable containing what I want, so what is it?
Thanks a lot!!!

Replies are listed 'Best First'.
Re: How do I know the location of current perl binary?
by Eliya (Vicar) on Jan 13, 2012 at 14:17 UTC
    there must be a perl variable

    perldoc perlvar

    (the "teach a man how to fish" thing, you know ... :)

Re: How do I know the location of current perl binary?
by Anonymous Monk on Jan 13, 2012 at 14:05 UTC