cormanaz has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use CGI; use HTTP::Daemon; use HTTP::Status; my $d = HTTP::Daemon->new(LocalPort => 8080) || die; while (my $c = $d->accept) { my $r = $c->get_request; my $q = new CGI($r); my @names = $q->param; foreach my $n (@names) { print "$n\t",$q->param($n),"\n"; } $c->close; undef($c); }
But when I call it with http://localhost:8080/test?foo=bar it prints HTTP::Request HASH(0x2220b28)
What am I doing wrong?
TIA....Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to use CGI with HTTP:Daemon
by ikegami (Patriarch) on Dec 01, 2007 at 01:47 UTC | |
|
Re: How to use CGI with HTTP:Daemon
by bingos (Vicar) on Dec 01, 2007 at 10:29 UTC | |
by cormanaz (Deacon) on Dec 01, 2007 at 16:29 UTC |