in reply to CGI SCRIPT ITSELF IS DISPLAYED
This isn’t a Perl specific issue ... it is, literally, a web-in-general FAQ.
The root cause of your problem is that there is no AddHandler directive (perhaps in an .htaccess file ...) which instructs Apache that a reference to this particular file (-type), in this particular directory, means that the content of the file should be executed, rather than served as though it were mere-text.