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

Re: How do I find what dir the perl script is running from?

by Vennis (Pilgrim)
on Feb 27, 2003 at 07:18 UTC ( [id://239020]=note: print w/replies, xml ) Need Help??


in reply to How do I find what directory the perl script is running from?

This works quite well:
$0=~/^(.+[\\\/])[^\\\/]+[\\\/]*$/; $cgidir= $1 || "./";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-03-29 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found