CGI displays contents of script



I have installed perl 5.8.8 which already has the CGI included in it.
I created a small test script that uses the CGI.pm. When I run the
following in my browser, it shows me the entire script and does not
execute the script. Does anyone know why this happens?

Here is my output from the web browser:


#!/usr/bin/perl use CGI; print "Content-type: text/plain\n\n"; print
"TEST";

.



Relevant Pages

  • Re: trouble with DBI/CGI
    ... >When I run the above program from a web browser, ... >properly when run from the command line. ... variable isn't set when you're running your script as a CGI. ...
    (comp.lang.perl.misc)
  • Client Web Browser & Remote SQL Script Error?
    ... -> I open a web browser on my local PC ... At this point I get a script error: ... Which is fair enough as it probably points to a problem with the SQL ... I *can* submit database changes via web browsers from most other PCs on ...
    (comp.databases.ms-sqlserver)
  • RE: WWW::Mechanize, save images from a page
    ... I just copied your script, and added a get on the image link. ... Then download the image. ... print "url to image is: http://$host$img_link\n";; # view that url in a web browser and/or ...
    (perl.beginners)
  • Re: system call
    ... I am using a cgi to call a pl script and then pass xml back to ... the web browser. ...
    (comp.lang.perl.misc)
  • Re: basic questions
    ... Setting a script that runs at 3:00 ... Set chron to run that shell script. ... Debug the GUI application with the REPL. ... You start up the Web browser, then browse the Web, visit a hundred ...
    (comp.lang.lisp)