How to execute Perl scripts in Notepad++
Step 1 – create test scripts:
Step 2 – preparing the “Run” command:
In the Run dialog you must now specify the path to the Perl.exe on your computer. (The button with the three small dots opens a selection dialog.) Normally the Perl installation is placed directly on C:\ and the Perl.exe is located in a folder called “bin”.
Step 3 – set the “Run” parameter:
Now you have to extend the command by the following parameter:
cmd /k C:\Perl\bin\perl.exe $(FULL_CURRENT_PATH) && pause
Just look at the screenshot above, if you’re not sure how to set the parameter. Without these additional parameters indeed the Perl console would get opened, but our script won’t run.
Step 4 – create a hotkey:
By clicking on the “Save” button you can create a shortcut aka hotkey to run your script.
Step 5 – test your result:
Now everything should work. If you press your hotkey (combination) your script should be executed directly in the console now. As always, If you still have questions, write me a comment.