package Apache::PrintEnv2; use strict; use warnings; use Apache::RequestRec (); # for $r->content_type use Apache::RequestIO (); # for $r->print use Apache::Const -compile => 'OK'; sub handler { my $r = shift; $r->content_type('text/plain'); $r->subprocess_env; for (sort keys %ENV){ $r->print("$_ => $ENV{$_}\n"); } return Apache::OK; } 1;