in reply to Perl Script help please

You can use shell redirection if you like.

./myscript.pl > demo.txt

Or you could modify the script itself:

#!/usr/bin/perl use strict; use warnings; open my $fh, '>', 'demo.txt' or die $!; print $fh "Content-type: text/html\n\n"; foreach my $key (sort keys %ENV) { print $fh "\$ENV{$key} = $ENV{$key}<br />\n"; } close $fh or die $!;

I suggest you spend 30 minutes reading perlintro. If this is homework, you're going to need to actually learn this, and perlintro is a good start.


Dave