http://qs321.pair.com?node_id=673140


in reply to Populate CGI from HTTP::Request wo/ using %ENV ?

To the best of my knowledge neither CGI nor CGI::Simple give you a way to populate header information directly into their respective objects; they just pull it from ENV automatically. Those are the only two CGI-related modules I've personally worked with; there may be others. A quick experiment shows you can localize %ENV though:
#!perl -l sub foo { local %ENV; $ENV{foo} = '1'; print $ENV{foo}; } foo; print 'yes' if $ENV{foo} eq '1';
doesn't print "yes"