#!/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
In reply to How to use CGI with HTTP:Daemon by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |