Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 chilling in the Monastery: (8)
As of 2015-07-30 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls