As a Perl convention, a Perl file must be saved with a . pl or.PL file extension in order to be recognized as a functioning Perl script
You can do this simply by checking the version of Perl by executing the following command in your terminal:
$ perl --version.
$ which perl. whereis perl.
$ sudo nano MyFirstPerlScript.pl.
$ sudo chmod +x MyFirstPearlScript.pl. ./ MyFirstPerlScript.pl. perl MyFirstPerlScript.pl.