Marketing_Insists
asked on
find scripts directory location
If $0 gives the location of the script you are running, how can I just get the directory where the script is located?
CWD; doesn't work the I want, since if I execute a script located on a network drive from the commandline on my local PC, the working directory would be whatever directory I'm in at my shell.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would probably
my @parts = split('\\\\',$0);
pop(@parts);
print join "\\",@parts;
my @parts = split('\\\\',$0);
pop(@parts);
print join "\\",@parts;
oops too late.
ASKER