summaryrefslogtreecommitdiff
path: root/eg
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-02-02 16:38:55 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-02-02 16:38:55 +0000
commit71f3e297ff71d9b213ccf3230601eae8b4e9b685 (patch)
treea6b15fca4b334a752aec42fe28f01085a70274d2 /eg
parentf14b5cec44a20371f37547f211a9de1d22dda6cb (diff)
downloadperl-71f3e297ff71d9b213ccf3230601eae8b4e9b685.tar.gz
CGI.pm updated to 2.46 (the CGI docs fixes redone
where applicable). p4raw-id: //depot/cfgperl@2787
Diffstat (limited to 'eg')
-rw-r--r--eg/cgi/file_upload.cgi10
-rw-r--r--eg/cgi/index.html5
2 files changed, 9 insertions, 6 deletions
diff --git a/eg/cgi/file_upload.cgi b/eg/cgi/file_upload.cgi
index f6bbbe0b74..38f85479f7 100644
--- a/eg/cgi/file_upload.cgi
+++ b/eg/cgi/file_upload.cgi
@@ -1,5 +1,6 @@
#!/usr/local/bin/perl -w
+use strict 'refs';
use lib '..';
use CGI qw(:standard);
use CGI::Carp qw/fatalsToBrowser/;
@@ -18,7 +19,7 @@ print h1("File Upload Example"),
will count the number of lines, words, and characters in
the file.';
-@types = ('count lines','count words','count characters');
+my @types = ('count lines','count words','count characters');
# Start a multipart form.
print start_multipart_form(),
@@ -31,9 +32,10 @@ print start_multipart_form(),
endform;
# Process the form if there is a file name entered
-if ($file = param('filename')) {
- $tmpfile=tmpFileName($file);
- $mimetype = uploadInfo($file)->{'Content-Type'} || '';
+if (my $file = param('filename')) {
+ my %stats;
+ my $tmpfile=tmpFileName($file);
+ my $mimetype = uploadInfo($file)->{'Content-Type'} || '';
print hr(),
h2($file),
h3($tmpfile),
diff --git a/eg/cgi/index.html b/eg/cgi/index.html
index 75e2d30139..4125b28920 100644
--- a/eg/cgi/index.html
+++ b/eg/cgi/index.html
@@ -54,7 +54,8 @@
<li><a href="crash.txt">Look at its source code</a>
</ul>
-<EM>The Following Scripts only Work with Netscape 2.0 & Internet Explorer only!</EM>
+<EM>The Following Scripts Work with Netscape Navigator 2.0 and higher,
+or Internet Explorer 3.0 and higher</EM>
<H2> Prompt for a file to upload and process it</H2>
<UL>
@@ -113,6 +114,6 @@
<ADDRESS>Lincoln D. Stein, lstein@genome.wi.mit.edu<br>
<a href="/">Whitehead Institute/MIT Center for Genome Research</a></ADDRESS>
<!-- hhmts start -->
-Last modified: Tue May 19 22:16:43 EDT 1998
+Last modified: Tue Nov 24 18:07:15 MET 1998
<!-- hhmts end -->
</BODY> </HTML>