|
|
| Come for the quick hacks, stay for the epiphanies. | |
| PerlMonks |
(tye)Re: Getting current directoryby tye (Sage) |
| on Feb 09, 2001 at 18:37 UTC ( [id://57454]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Unlike argv[0] in C, $0 in Perl is not spoofable. See FindBin is broken (RE: How do I get the full path to the script executing?) for more details. But $0 is certainly inappropriate for getting the full path to "the current working directory" or "where the script was called from" (though I could see misinterpretting this last phrase to mean the full path to the script). $0 often tells you the full path to where the script resides. - tye (but my friends call me "Tye")
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||