I am using perl64 on Windows 10 with UWIN installed.
I wrote a perl script, sv2jb.pl, which runs fine when invoked under ksh by just typing its name, and when it is in the current directory.
I then created a subdirectory of my home directory called "scripts", moved that script there, added its full path to the $PATH environment of ksh. Now when I invoke sv2jb.pl from any other directory than where this script is (by just typing the script's name), this is the message I get back:
$ sv2jb.pl Can't open perl script "//C/users/me/desktop/scripts/sv2jb.pl" : No such file or directory
But this is exactly where that file is...
If I invoke it so from the home directory (in which the scripts directory is):
it works fine...
Also, if I cd to that directory, and invoke sv2jb.pl:
$ cd scripts $ sv2jb.pl
it runs correctly.
I am at a loss to understand what is wrong:
- The script itself is OK, since when invoked from its directory it runs. FYI, its first line is: #!//c/perl64/bin/perl.exe
- The $PATH variable is OK, since the error message shows that ksh located the file (while saying it can't find it).