This is my program:
[root@localhost cgi-bin]# locate first.pl /home/Ram/Desktop/work/first.pl /usr/local/apache2/cgi-bin/first.pl [root@localhost cgi-bin]#
Yes, the above process works but the easy way is:
CGI- sudo a2enmod cgi
Best Of Luck !!