[SOLVED]The system cannot find the path specified in Visual Studio Code for Perl


While trying to run my first perl program on Visual Studio Code, I encountered error as depicted below

[Running] /usr/bin/perl -w “c:\Users\amkusharma\Desktop\explore\tempCodeRunnerFile.pl”
The system cannot find the path specified.
[Done] exited with code=1 in 0.145 seconds

After some moments of debugging, I realised my installation directory in Windows is not as mentioned above while it is Perl6.4 version for which I have to change the shebang so that it can directly point to perl.exe with absolute path

C:\Perl64\bin\perl.exe

& Woila it worked

[Running] C:\Perl64\bin\perl.exe -w “c:\Users\amkusharma\Desktop\explore\hello_world.pl”
Hello World!
[Done] exited with code=0 in 0.174 seconds
Advertisements