ls -l /usr/share | grep perl5
drwxr-xr-x. 49 root root 4096 Mar 31 18:40 perl5
I don't see how it's a system permissions issue. As user, I can cat the file
made a small test script:
$ cat perl-test.pl
#!/usr/bin/perl
use lib '/usr/share/perl5';
use strict;
print "ok";
$ chmod +x perl-test.pl
$ ./perl-test.pl
Can't locate lib.pm: Permission denied at ./perl-test.pl line 2.
BEGIN failed--compilation aborted at ./perl-test.pl line 2.
Not sure what you mean by printing @INC in a BEGIN block, but I sure don't know how.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.