Finding what's been added to @INC

David Cantrell david at
Wed Jul 16 12:39:19 BST 2008

On Tue, Jul 15, 2008 at 10:00:46PM +0200, Abigail wrote:
> On Tue, Jul 15, 2008 at 08:34:06PM +0100, Simon Wistow wrote:
> > I'd like to be able to walk @INC trying to find everything that's been 
> > added above and beyond what you'd see from perl -V.
> Just run perl -V and subtract that from @INC?
>    $ perl -Ifoo -E 'use lib "bar";
>                     @inc{@INC}=(); $_=`perl -V`; s/.*\@INC:\s*//s;
>                     delete $inc{$_} for /(\S+)/g; say for keys %inc'

`$^X -V`, not `perl -V`.

David Cantrell | Hero of the Information Age

Perl: the only language that makes Welsh look acceptable

More information about the mailing list