in reply to current working dir is location of script?

Not a fact. It looks like you've been in /home/me/ whenever you've run this. Try from the command line,

[me]$ mkdir /home/me/foo [me]$ cd /home/me/foo [foo]$ /home/me/wd.pl

After Compline,
Zaxo