in reply to perl vs she-bang perl
Discussion:
Lots of good answers here. Thank you all.
After consideration of the responses, I can say that my first point would better be stated as
What command was used to start my script?It's going to be either perl [perlargs] script ... or script ...
In the latter case, any Perl arguments are in the shebang line, but in the end, I don't care; if I restart the script the same way it was started, the Perl arguments will be applied the same way, and transparently if on the shebang line. Looking them up and applying them myself with an explict perl command would be inconsistent with the original start.
Solutions:
In *nix land, my best bet is to scrape a ps command. It gives me everything I need in one shot.
In Win* land, the wmic solution solution is perfect for my needs; it appears to be present in Windows all the way back to XP.
Followup:
So, if I wanted to bundle this all up in a module for CPAN, what do y'all think is a good name for the module and it's only function?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: perl vs she-bang perl
by mpersico (Monk) on Mar 07, 2013 at 17:08 UTC |