programming-examples/perl/CGI/Program to display CGI environment variables.pl
2019-11-15 12:59:38 +01:00

14 lines
300 B
Perl

use warnings;
use strict;
use CGI qw( :standard );
print header(), start_html( "Environment Variables" );
print '<table>';
foreach my $variable ( sort( keys %ENV ) ) {
print Tr( td( b( "$variable:" ) ),
td( i( $ENV{ $variable } ) ) );
}
print '</table>', end_html();