programming-examples/perl/Statement/foreach Loop Hash Processing in a CGI Program.pl
2019-11-15 12:59:38 +01:00

14 lines
242 B
Perl

#!/usr/bin/perl
print<<'eof';
Content-Type: text/html
<html>
<head><title>CGI Environment Variables</title></head>
<body>
eof
foreach $index (keys %ENV){
print "$index => $ENV{$index} <br>";
}
print<<'eof';
</body>
</html>
eof