programming-examples/perl/Statement/foreach Loop Hash Processing in a CGI Program.pl

14 lines
242 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/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