Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: program path

by ZlR (Chaplain)
on Feb 25, 2005 at 14:57 UTC ( [id://434496]=note: print w/replies, xml ) Need Help??


in reply to program path

$0 is a special variable that holds the full path of the script, if you launched it with the full path .
If you launch it with ./ for example you will not have the full path.
Strip the file name from the path with File::Basename .

use cwd will give you the cwd function that returns the current path .

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found