[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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s