If your script has a .pl extension and you run it by just entering its name and extension at the command line, the MKS KornShell will search the registry for a command to use to run the script.
In the registry, .pl points to mks_perl . The command in mks_perl doesn't pass arguments:
[C:/] assoc .pl
.pl mks_perl
[C:/] ftype mks_perl
mks_perl perl.exe %1
You can easily change the registry entry for mks_perl to pass arguments:
[C:/] ftype mks_perl 'perl.exe "%1" %*'
This problem isn't encountered if you run your scripts with a hashbang or like:
[C:/] perl script.pl args
Note: that current versions of MKS Toolkit set the registry entry differently to avoid this issue. |