mpersico has asked for the wisdom of the Perl Monks concerning the following question:
In a perl script, is there anyway to determine the following:
1) Was the script started via 'perl script.pl' or 'script.pl' using the she-bang line?
2) Can I determine what options were passed to 'perl' for the former or what options were on the she-bang line for the latter?
The reason is that I am looking at the Restart functionality of the Devel::ptkdb debugger and the restart is hardcoded as perl -d:ptkdb -w originalScript originalArgs
If any other options were given to perl (-a, -n -e, etc) then the restart will be different than the original call.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl vs she-bang perl
by tobyink (Canon) on Mar 06, 2013 at 22:45 UTC | |
by vsespb (Chaplain) on Mar 06, 2013 at 23:36 UTC | |
|
Re: perl vs she-bang perl
by BrowserUk (Patriarch) on Mar 06, 2013 at 22:29 UTC | |
|
Re: perl vs she-bang perl
by mpersico (Monk) on Mar 07, 2013 at 14:56 UTC | |
by mpersico (Monk) on Mar 07, 2013 at 17:08 UTC | |
|
Re: perl vs she-bang perl
by pvaldes (Chaplain) on Mar 07, 2013 at 10:39 UTC |