Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Re: uploading a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1441 of 1476
Post > Topic >>

Re: uploading a file with perl

by noreply@[EMAIL PROTECTED] (Gunnar Hjalmarsson) Jan 13, 2008 at 08:45 PM

Mike Williams wrote:
> On Jan 12, 2008 9:33 PM, Sean Davis wrote:
>> You should probably be using CGI.pm.  It will vastly simplify what you
are
>> doing.  Then, you can read any of a dozen sites on doing file uploads
using
>> CGI; see search.cpan.org for the details of using CGI.pm.
> 
> I agree with Sean.  You have 'use CGI' in your code, but you don't
> actually use it, you really should.

Or use CGI::UploadEasy, which is a wrapper around the upload 
functionality of CGI.pm.

> Notice that the upload code using CGI is about one third the length of
> your non-working code.
> There should be more error checking added, but it is up and limping.
> 
> You should look at the perldoc for CGI.   In particular search for MAX
> (with /MAX) and read the section about settint the maximum size of
> uploads.

All that would be taken care of by CGI::UploadEasy. And significantly 
less code - see http://search.cpan.org/perldoc?CGI::UploadEasy#EXAMPLE

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 




 1 Posts in Topic:
Re: uploading a file with perl
noreply@[EMAIL PROTECTED]  2008-01-13 20:45:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 6:54:12 CDT 2008.