Don't assuming your work directory is set to the directory which contains your script. Putting the following at the top of your script should solve the issue.
use File::Basename qw( dirname ); BEGIN { # Set working directory to the one in which the script resides. chdir(dirname($0)); }
By the way, the above is more reliable than FindBin.
In reply to Re: Cannot open a file using a relative path
by ikegami
in thread Cannot open a file using a relative path
by Nik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |