in reply to diplaying the entire $ENV set

Simple:
#!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; foreach my $k (sort (keys %ENV)) { print "$k: $ENV{$k}<BR>"; }
HTH