Perl library path/s
Question: I need to find the location of my perl library/libraries how can I do this?
Something similar to what this gives you for python...

    
    
    python -c "import sys; print sys.path"
    

Thanks


Answer: The physical location of loaded modules are in the
[`%INC`](http://perldoc.perl.org/perlvar.html#%25INC) hash:

>   * `%INC`
>
> The hash `%INC` contains entries for each filename included via the
> [`do`](http://perldoc.perl.org/functions/do.html),
> [`require`](http://perldoc.perl.org/functions/require.html), or
> [`use`](http://perldoc.perl.org/functions/use.html) operators. The key is
> the filename you specified (with module names converted to pathnames), and
> the value is the location of the file found. The `require` operator uses
> this hash to determine whether a particular file has already been included.
>
> If the file was loaded via a hook (e.g. a subroutine reference, see
> [require](http://perldoc.perl.org/functions/require.html) for a description
> of these hooks), this hook is by default inserted into `%INC` in place of a
> filename. Note, however, that the hook may have set the `%INC` entry by
> itself to provide some more specific info.
>
>

Usage demonstrated for a random module on my system:

    
    
    $ perl -MFile::Slurp -e 'print $INC{"File/Slurp.pm"}'
    /Users/miller/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/File/Slurp.pm
    

