Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: FindBin is broken (RE: How do I get the full path to the script executing?)

by zrajm (Beadle)
on Feb 17, 2009 at 19:18 UTC ( #744526=note: print w/ replies, xml ) Need Help??


in reply to FindBin is broken (RE: How do I get the full path to the script executing?)
in thread files

Looking around for a solution to the above problem I found:

use Cwd 'abs_path'; my $scriptpath = abs_path($0);
..but then of course I explicitly wanted to follow any symlinks, so that I could place script & data in the same separate directory, put a symlink to the script in my $PATH, and have the script dig figure out where to read its data by following that link.

See also:


Comment on Re: FindBin is broken (RE: How do I get the full path to the script executing?)
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://744526]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-10-24 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (131 votes), past polls