use File::Basename; print dirname $0;
If you're willing to risk the regex:
print $0 =~ /(.*)\\/; # or if you want the trailing backslash print $0 =~ /(.*\\)/;
In reply to Re: How To Get The File's Directory?
by keszler
in thread How To Get The File's Directory?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |