I'm writing a script and will package it using PP to distribute to users that don't have Perl installed on their PCs.
The script should save a file in the current directory. This is all well and good if I run it from the command prompt, but if I were to double click it after compiling it into an executable, it will then save it to "C:\Documents and Settings\User\".
I've tried using getcwd to get the current directory, but it appears to be getting the current WORKING directory, so instead of "C:\Perlworks" it still gets "C:\Documents and Settings\User\".
I suppose I could hard-code the save directory, but this seems a bit inelegant. Any ideas?
In reply to Current Directory in Windows by kvtan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |