perl - @INC doesn't include current directory
For some reason when I run perl scripts, "require" doesn't search the
current directory. I think this is non-standard and want to fix it.
I'm using Slackware 12.0 and Perl 5.8.8.
If I run:
$ perl -V
the output looks good, and at the end it says:
@INC:
/usr/lib/perl5/5.8.8/i486-linux-thread-multi
/usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i486-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
.
But if I put this in a script:
#!/usr/bin/perl -t
print @INC ;
The directories printed don't include "."
In my scripts, to use included code from cwd, I have to say "require
./filename", otherwise it doesn't find filename.
|