in reply to Re^3: showPerlDirConfig
in thread showPerlDirConfig
Aristotle wrote:
my ($binary) = file_name_is_absolute($^X) ? $^X : ( grep -x, map catfile($_,$^X), split /\Q$Config::Config{path_sep}/, $ENV{PATH} );
As far as I can see, you are calling grep in a scalar context and would normally be putting "1" (0x1) into $binary using this code. Am I wrong?
I (being the one who has to maintain this code) kept to my own version of what is less convoluted / obfuscated, but have added credits in the POD for pointing me towards a better code block for getting the fully-qualified path to the perl interpreter. Thank you.
-- use PerlMonk::Tye qw(:wisely);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: showPerlDirConfig
by Aristotle (Chancellor) on Aug 07, 2003 at 15:47 UTC | |
by Intrepid (Curate) on Aug 07, 2003 at 17:40 UTC | |
by Aristotle (Chancellor) on Aug 07, 2003 at 17:45 UTC |