in reply to Script Directory vs. Directory Script was Called From
use Cwd; print "Current dir is ", getcwd, "\n"; (my $dir) = $0 =~ m|(.*?)[^\\/]+$|; print "Current dir is ", $dir, "\n";
These both return the correct result but the format is a little different.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|