For Windows, first ready the environment for use by downloading and installing Strawberry Perl as Perl does not support Windows by default (can verify with this command using the command prompt: perl -v).
To be able to use Perl with VS Code IDE, install the Perl (by Gerald Richter) from View > Extension.
Save as <filename.pl>. Can run in VS Code by:
- R-click file at Explorer (View > Explorer) > Open in Integrated Terminal
- Run: perl .\filename.pl
CPAN is a repository