http://www.perlmonks.org?node_id=277726


in reply to Re: (Not Quite Perl) Running Scripts from Right-Click Context Menu in Windows
in thread (Not Quite Perl) Running Scripts from Right-Click Context Menu in Windows

Strange. I tried the following code and it printed the directory I clicked on. I think when you right-click on a directory and run a program, it runs out of that directory. What happens if you run the Cwd script from c:\devel\perl\test as a command line app?
use Cwd; my $curDir = cwd; print "$curDir\n";