ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
Options +ExecCGI
AddHandler cgi-script cgi pl
Make sure the permissions are right on the file - chmod a+x and the owner should be www-data.
Make sure that the path to the interpreter is correct i.e. with perl - /usr/bin/perl.
Useful information about CGI configuration.