Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#! /usr/bin/perl -w use CGI qw(: standard); my $query = new CGI; print STDOUT $query->header(); print STDOUT $query->start_html -title=> "CGI", -BGCOLOR=>"#CCDDFF"); my $file_contents = $query->param('file'); my $image = $query->param('image'); $file_contents =~ m/^.*(\\|\/)(.*)/; my $name = $2; $image =~ m/^.*(\\|\/) (.*)/; my $image_name = $2; while (<$file_contents>) { $data = do { local $/ = undef; <$file_contents> }; } print STDOUT "$data<p>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: submitting files to a cgi
by Aristotle (Chancellor) on Jan 27, 2003 at 17:11 UTC | |
by Anonymous Monk on Jan 29, 2003 at 10:39 UTC | |
|
Re: submitting files to a cgi
by cidaris (Friar) on Jan 27, 2003 at 22:22 UTC |