I have installed ActivePerl on my Windows OS. I have followed below URL procedure to install
ActivePerl Installation
After having done that, I have tried to run "perl -v " on the command line. But it reports the following error.
The system cannot execute the specified program
What do I need to do to solve these issues?
Perl is installed by default in C:\Perl . The default drive " C " selected will be the same drive that the operating system is installed on, or the drive that has the largest amount of space available.
The perl.exe executable is in "C:\Program Files\MATLAB\Rrelease\sys\perl\win32\bin\perl.exe" where release will be something like 2020b. You only need to do this once - after that any of the . command scripts should open with MATLAB's Perl.
Microsoft Windows To run Perl in a Windows environment, we recommend using Strawberry Perl, which contains all you need to develop Perl scripts for use in Windows and other platforms. If you want to use Perl in a Linux environment under Windows, you can also use WSL (Windows Subsystem for Linux).
Making Perl available via the PATH settings on WindowsRight-click on Computer. Go to “Properties” and select the tab “Advanced System settings”. Choose “Environment Variables” and select Path from the list of system variables. Choose Edit .
I was facing a similar issue... but the thing was that I could execute the file by right clicking the file and opening it with perl command line interpreter.... but still the perl-v
command would give the error... all I had to do was execute this command
set PATH=C:\Perl\bin;%PATH%
This solved the issue...
You need to make sure the directory where the Perl executable lives (it might be C:\perl\bin
, but basically wherever you told ActiveState Perl to be installed) is in your PATH environmental variable (you can find the variable value by typing set PATH
command on command line prompt in Windows).
If you're not sure where you installed Perl to (and can't find it in the default C:\perl\bin
), you can find the directory by going to Start menu, finding ActiveState Perl folder, and right-clicking on "Perl Package Manager" icon, then pick "Properties" from the right-click menu. Properties window (in the "Shortcut" tab) will have a "Target" line showing the directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With