Just another Perl shrine | |
PerlMonks |
Assignment to @INC in BEGIN block gives puzzling resultsby jkeenan1 (Deacon) |
on Dec 23, 2006 at 17:21 UTC ( [id://591454]=perlquestion: print w/replies, xml ) | Need Help?? |
jkeenan1 has asked for the wisdom of the Perl Monks concerning the following question:
Suppose that I have a valid Perl module First.pm in a non-@INC directory. Then this program DWIMs:
Now suppose I assign that directory to @INC in a BEGIN block, then print out the elements of @INC immediately after the BEGIN block, without use-ing First.pm:
Again, that DWIMs:
But when I attempt to use First, Perl can't find it!
Gives:
What am I failing to understand about @INC? Thank you very much.
Jim Keenan
Back to
Seekers of Perl Wisdom
|
|