CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Uploads images using



Jul 20, 2000, 9:07 AM

Post #1 of 2 (952 views)
Uploads images using Can't Post

Please help me, I need to be able to upload files using I have a script now, but when I upload images they come out all screwy. I tried putting the filehandle in binmode, nothing works.

Thanks ahead,


Aug 6, 2000, 9:00 AM

Post #2 of 2 (952 views)
Re: Uploads images using [In reply to] Can't Post

Actually, you may wish to toss out the window and replace it with was popularly used with Perl4, but is the "de facto standard" for Perl5+. Using, you can use the following code to upload files:

For your form tag and file upload field:

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

print start_multipart_form();
submit(-label=>'Upload File'),

Then, to process the input:

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

$file = param->{'upload'};
open(SAVE,"filenametosave") &#0124; &#0124; die $!;
print SAVE $data;
close SAVE;

In other words, I don't know how to use, only You may have a hard time finding someone who knows enough to help you with that dinosaur Smile

(The above code was excerpted from "Official Guide to Programming with" by Lincoln Stein. Publisher: Wiley Computer Publishing)

Footnote: if you're interested in converting your scripts from to, check out Lincoln Stein's "Porting Scripts to" article at


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives