Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am busy converting a perl script into a CGI.. this snippet of perl code works fine;
So why doesn't this CGI alternative snippet not work??open (FILE, $ARGV[0]) or die "unable to open file $!"; my $data = do {local $/; <FILE>; }; print $data;
thanks monks$file_contents = $query->param('file'); $file_contents =~ m/^.*(\\|/\)(.*)/; my $name = $2; open (FILE, ">$name") or die $!; my $data = do {local $/; <FILE>; }; print STDOUT $data;
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: perl + CGI's
by merlyn (Sage) on Dec 13, 2002 at 15:42 UTC | |
Re: perl + CGI's
by hiseldl (Priest) on Dec 13, 2002 at 15:44 UTC | |
(jeffa) Re: perl + CGI's
by jeffa (Bishop) on Dec 13, 2002 at 15:48 UTC |
Back to
Seekers of Perl Wisdom