> my %temp = $apache->headers_in;
 > foreach (keys %temp) {
 >         print $temp{$_};
 >         }

this should be:

my $temp = $apache->headers_in;
foreach (keys %$temp) {
        print "$_ $temp->{$_}\n";
}

just because you can do it but nobody really talks about it, this is as good a place to mention...


since headers_in is a table, you can also iterate the table directly

$r->headers_in->do(sub {
   my ($key, $value) = @_;
   print "$key => $value\n";
   1;
});

fwiw

--Geoff




-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to