1).pl extension
A common extension is “.pl” in the perl source file. In other words, it is an extension attached when writing source code of perl, such as in Notepad.
2).cgi extension
Apply .cgi extension to Perl program that runs as CGI.
On ordinary web servers, .cgi is used to distinguish CGI programs. In other words, regardless of the language used, in C, Perl or PHP, it is often the case that .cgi is used as a criterion if you run it “with CGI”. This depends on the setting of the server, so if you only set it as .pl, it means that it works with .pl, Perl or C(However, it depends on the server whether there is an operating envrionment other than Perl.)
Also, on ordinary web servers, .pl will also use Perl code when the web server interprets Perl code directly. This does not start an external process unlike CGI, but interprets it inside the web server using mod_perl etc. It is assumed that mod_perl is installed on the server.
In the former case, CGI etc. that is distributed will also work if you change. CGI to .pl and then istall it normally. if it is the latter, it may be necessary to add some hands depending on circumstances.