On Tuesday 11 November 2003 15:23, Andrew Gaffney wrote: > > I have tried stripping the leading "\n", "Content-Type: image/jpeg\r\n", > > "\r\n" line, "\r\n" after the image data, and the trailing "\r\n" line > > but the resulting file does not seem to be a valid jpeg image. > > This looks promising. > > http://www.perldoc.com/perl5.6/lib/MIME/Base64.html > > -- > Andrew Gaffney
Thanks for the responses Andrew. It turns out the problem was that I was printing binary JPEG in text mode. I just needed to use binmode() and everything is happy. open(OUTFILE, "> ./jpegs/$jpeg-num.jpeg"); binmode OUTFILE; print OUTFILE $jpeg; close(OUTFILE); Christopher -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]