PTC MKS Toolkit Knowledge Base

Product:MKS Toolkit (All)
Keywords:script, argument, pass, argv
Category:Utilities/Knowledge Base

Why are arguments no longer being passed to my perl scripts now that I've upgraded to MKS Toolkit 6.1?

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 args

that current versions of MKS Toolkit set the registry entry differently to avoid this issue.