in reply to Re: perl cant find it anymore!
in thread perl cant find it anymore!
Yet More Ways of setting @INC before your script starts running (and thus in time to affect both use and require):
#!/path/to/perl -w -I/opt/perl5/lib/5.6.1
(this also works in a module, of course)use lib qw(/opt/perl5/lib/5.6.1);
Either is preferable to manipulating @INC directly: it's clearer, and you get nicer behaviour simpler (e.g. beatnik's and Azatoth's code above adds the new directory as the last directory to be searched; you'd usually want to search it first).
|
|---|