>>>>> "Pete" == Pete Emerson <[EMAIL PROTECTED]> writes:

Pete> It's the same way. Here's code that works for me:

Pete> #!/usr/bin/perl -w

Pete> use strict;
Pete> use CGI qw(:standard);

Pete> print header;
Pete> print start_html;
Pete> foreach my $key (sort keys %ENV) {
Pete>      print "\$ENV{$key} = $ENV{$key}<br/>\n";
Pete> }
Pete> print end_html;

This breaks if there's any HTML entities in the output.
Simpler:

print header('text/plain');
foreach my $key (sort keys %ENV) {
  print "\$ENV{$key} = $ENV{$key}\n";
}

There... html-safe now. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to