Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Can't find relative path

by dasgar (Curate)
on Mar 24, 2012 at 20:42 UTC ( #961436=note: print w/replies, xml ) Need Help??


in reply to Can't find relative path

I would recommend using the cwd function from the Cwd module, which will give you the current directory of script so long as your script isn't changing directories (i.e. system calls to cd). Then you can append the relative path of the file to the output of cwd. By doing so, you should then be able to move your script and folder structure to any folder and it should work as far as paths to files are concerned.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://961436]
help
Chatterbox?
and the monastery is silent...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2017-02-25 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (368 votes). Check out past polls.