A core module which encapsulates this technique is called FindBin. If your application wanted to keep some local library of modules, you could apply lib and FindBin together:
# myscript.pl use FindBin; use lib $FindBin::Bin; use MyModule; # kept in same directory as myscript.pl
--
[ e d @ h a l l e y . c c ]
In reply to Re: Re: current working dir is location of script?
by halley
in thread current working dir is location of script?
by mandog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |