Perl is interpreted, therefore you need the perl executable at least (Check out perl.org). Also, .cgi is meant for webpages using perl as backend, what you want is .pl.
To run it, either put a shabang as first line with correct path (ie. #!/usr/bin/perl) or pass it as parameter to the perl interpreter (ie. perl myScript.pl)