M
M
mercower262021-11-04 10:52:56
Perl
mercower26, 2021-11-04 10:52:56

How to correctly configure the launch of pl scripts on windows?

On Linux, you need to drop the script into the /usr/local/bin/ folder and the script works by entering a command in the terminal, for example, script.pl. How does it work on windows? Only specify the full path to the script, or can it be done somehow to enter only script.pl on the command line and it works?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mercower26, 2021-11-08
@mercower26

Issue resolved, opened ActiveState Perl-5.32 CLI, reinstalled Modern::Perl and PHP::Serialization, now it works

S
Sergio, 2021-11-04
@sergiodev

You need to add the folder with the script to PATH or put the script itself in some folder that is already there (C:\Windows for example).
My Computer -> Properties -> Advanced Settings -> Environment Variables
At the end of the PATH variable add ; and the path to the folder with the script.
If you run via cmd.exe, but on Bash, then you will also have to create a Batch file (script.bat) that will run your script via Perl. *.pl files are not executable on Windows, so the script just won't run.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question