Page 1 of 1

problem using Perl CGI.pm

PostPosted: 12. January 2007 21:57
by thevoid
Hi, hope someone can help with this

I am able to browse web pages I have created just fine using XAMPP until I try to use the Perl CGI module, when I get Server error/Error 500.

An example of a script which will not work -

#!/usr/bin/perl -wT
#test.cgi
use strict;
use CGI;

my $query = CGI->new();

print $query->header( "text/html" ),
$query->start_html(-title => "My First CGI Script",
-bgcolor => "#ffffcc" ),
$query->h1( "This is a pretty lame Web page" ),
$query->end_html;

I have placed it in xampp\cgi-bin and am looking for it with localhost/cgi-bin/test.cgi... I am obviously just learning the CGI module, any suggestions as to why this is not working would be appreciated : )

Thanks

PostPosted: 12. January 2007 22:05
by Wiedmann
You have Perl installed?

PostPosted: 12. January 2007 22:07
by thevoid
Yep, have Perl installed

PostPosted: 12. January 2007 22:11
by Wiedmann
Code: Select all
#!/usr/bin/perl -wT

Your Perl is in the directory"/usr/bin"?

PostPosted: 12. January 2007 22:13
by thevoid
whoops, no

I see where I'm going wrong here, thanks very much for the help :oops: