in reply to Getting a query string.

As the others have said, the header is missing.

Here's a variant of a cgi script I use to dump out interesting things, like the environment that the web server is providing.

#!/usr/bin/perl -w use strict; use warnings; use CGI qw(-debug escapeHTML -oldstyle_urls); my $q = CGI->new(); print $q->header('text/html'); print "<html>\n"; print "<body>\n"; print "<p>Hello, World</p>\n"; print "<p>\n"; print "Environment variables:\n"; print "<br/>\n"; foreach (sort keys %ENV) { print escapeHTML($_)." => ".escapeHTML($ENV{$_})."\n"; print "<br/>\n"; } print "</p>\n"; print "</body>\n"; print "</html>\n";

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.