[root@localhost cgi-bin]# which perl /usr/bin/perl [root@localhost cgi-bin]# vi cgi-bin/outputfile_new.cgi [root@localhost cgi-bin]# vi outputfile_new.cgi #!/usr/bin/perl use strict; use warnings; use CGI qw(:standard); my $cgi = CGI->new(); print $cgi->header(); print "Hello World!"; #add newlines where appropriate [root@localhost cgi-bin]# ./outputfile_new.cgi ./outputfile_new.cgi: line 3: use: command not found ./outputfile_new.cgi: line 4: use: command not found ./outputfile_new.cgi: line 5: syntax error near unexpected token `(' ./outputfile_new.cgi: line 5: `use CGI qw(:standard); ' [root@localhost cgi-bin]# tr -cd '[:print:]\n\t' cgi-bin/changed_use_CGI_line.cgi -bash: cgi-bin/outputfile_new.cgi: No such file or directory [root@localhost cgi-bin]# cd .. [root@localhost htdocs]# tr -cd '[:print:]\n\t' cgi-bin/changed_use_CGI_line.cgi [root@localhost htdocs]# chmod -R 755 cgi-bin [root@localhost htdocs]# go to web address... cgi-bin/changed_use_CGI_line.cgi Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. apache error logs... [Thu Sep 27 13:25:56 2007] [error] [client 81.86.45.98] Premature end of script headers: changed_use_CGI_line.cgi [Thu Sep 27 13:25:33 2007] [error] [client 81.86.45.98] Premature end of script headers: changed_use_CGI_line.cgi [Thu Sep 27 13:23:49 2007] [error] [client 81.86.45.98] Premature end of script headers: outputfile_new.cgi [Thu Sep 27 13:18:30 2007] [error] [client 81.86.45.98] Premature end of script headers: outputfile_new.cgi