> I have a perl script test.pl which is present in
> directory A. And this test.pl script uses some other
> scripts in directory A to do some processes, and hence
> uses relative paths respective to directory A. The
> perl script runs successully in directory A. 
> 
> But when I have to call this Perl script from
> directory B, it does not run because the relative
> paths are not valid. How can I run this script from
> directory B without necessitating changes in paths.

use FindBin;

documented at:

perldoc FindBin

once you know the location of the original script, you can
use relative paths off that.

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to