ck346 has asked for the wisdom of the Perl Monks concerning the following question:
I'm new to perl and have this small perl script I made and I need to change it from displaying the result on the terminal window to outputting it to a file for example like demo.txt instead. I have spent all day and can't figure it out. Any help would be greatly appreciated.
#!/usr/bin/perl -w print "Content-type: text/html\n\n"; foreach my $key (sort keys %ENV) { print "\$ENV{$key} = $ENV{$key}<br/>\n"; } exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Script help please
by Athanasius (Archbishop) on Oct 05, 2015 at 03:08 UTC | |
|
Re: Perl Script help please
by davido (Cardinal) on Oct 05, 2015 at 03:14 UTC |