in reply to Re: Permission denied to module
in thread Permission denied to module

A common variant on an unreadable file is that the directory which the file may or may not be in is itself unreadable (perl doesn't distinguish between these cases). So the OP likely has PERLLIB or PERL5LIB including an unreadable directory.

The almost-released perl-5.22.0 improves the error message by indicating which path failed:

$ export PERLLIB=/root $ perl-5.16.0 -Mstrict -e1 $ perl-5.18.0 -Mstrict -e1 Can't locate strict.pm: Permission denied. $ perl-5.20.0 -Mstrict -e1 Can't locate strict.pm: Permission denied. $ perl5.22.0-RC2 -Mstrict -e1 Can't locate strict.pm: /root/strict.pm: Permission denied.

Dave.

Replies are listed 'Best First'.
Re^3: Permission denied to module
by zdavek (Initiate) on May 27, 2015 at 14:49 UTC
    Yes! That was it! We had PERL5LIB defined in our shell initialization scripts with a directory that was not accessible to most of our users. Thanks.