No such thing as a small change | |
PerlMonks |
How To Get The File's Directory?by Anonymous Monk |
on Nov 19, 2009 at 14:44 UTC ( [id://808161]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I have a file, c:/temp/temp.pl It has only 2 lines: Now, if I run it in c:/temp/, it gives "c:/temp". If I run it in c:/, it gives "c:/". How do I ensure that it always gives "c:/temp" (the location of the file itself) as the output, regardless of where I run the file? Thanks in advance.
Back to
Seekers of Perl Wisdom
|
|