Home: Perl Programming Help: Advanced:
Writing Binary Files



djpaul
Deleted

Jul 20, 2000, 9:02 AM


Views: 2274
Writing Binary Files

I am working on an upload script which can upload image files.

I am using cgi-lib.pl, because I can't figure out how to install the CGI.pm module. Anyways, here is what I have. When I run this part of the script the image file, when accessed through a browser, looks all messed up. I thought I put the file in binary mode, so why does it still mess up?

open (ORD, ">/usr/www/users/biggins/domains/netifieds.com/write/file.jpg");
binmode (ORD);
print ORD $in{'upfile'};
close (ORD);

when I upload anything other than an image file, it works fine. What is going on?

Thanks ahead of time,
Paul


dws
Deleted

Jul 21, 2000, 12:17 AM


Views: 2274
Re: Writing Binary Files

Answered in the Intermediate forum. Please don't post duplicate questions.


errr
Deleted

Aug 15, 2000, 10:17 AM


Views: 2274
Re: Writing Binary Files

You cannot figure out how to install a module that COMES WITH PERL 5 and you're posting in Advanced???