dpuu has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way to figure out what command line args were passed to the perl interpreter (i.e. are not part of ARGV). On Linux I can do:
which outputs:perl -le '$/ = "\0"; open my $fh, "/proc/$$/cmdline"; print for <$fh>'
However, this is not portable to systems that don't have the /proc file system. Is there a hook into perl itself to get this information? (specifically, I'm wanting any /-d:.*/ flags)/home/utils/perl-5.10/5.10.0-nothreads-64/bin/perl -le $/ = "\0"; open my $fh, "/proc/$$/cmdline"; print for <$fh>
--Dave
Opinions my own; statements of fact may be in error.
Opinions my own; statements of fact may be in error.
Back to
Seekers of Perl Wisdom