#! /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>";
In reply to submitting files to a cgi by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |