http://qs321.pair.com?node_id=242541


in reply to Re: Find the full path of the script at run time
in thread Find the full path of the script at run time

I'm sorry, but this is wrong.

If my script is C:\scripts\cwd.pl, and I run your code:
C:\> C:\scripts\cwd.pl C:\
I need the location of the script, not the current directory.

ibanix

$ echo '$0 & $0 &' > foo; chmod a+x foo; foo;