Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
perl -le 'print for reverse @INC'
/Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0 /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0/darwin-2level /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0 /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0/darwin-2level
perl -MConfig -le 'print $Config{$_} for qw[privlib archlib sitelib si +tearch]'
/Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0 /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/5.42.0/darwin-2level /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0 /Users/u/perl5/perlbrew/perls/perl-5.42.0/lib/site_perl/5.42.0/darwin-2levelIs this a standard thing on all perl installations? I can hack up an -M switch detector by looking for things in %INC that don't match the default paths in @INC. Is there an easier way or is this the easiest way? Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding the value of -I and -M command line switches
by tobyink (Canon) on May 21, 2026 at 12:08 UTC |