in reply to How to run a perl program from the Windows CMD?

Open a command prompt, type the following:

perl -le "print $^X"

Copy the output from above (e.g. the output for me was D:\perl\bin\perl.exe), run the following from the command prompt (remember to change my example path for the output of the first command):

assoc .pl=PerlScript ftype PerlScript=D:\perl\bin\perl.exe "%1" %*

test.pl will now run the script rather than open it in your text editor.