
rjoseph
Novice
May 9, 2001, 9:56 AM
Post #4 of 6
(456 views)
|
|
Re:Add gif to perl code---------------------------7d13d41f58c<br>Content-Disposition: form-data; name="Icon"<br><br>book.gif
[In reply to]
|
Can't Post
|
|
OK, you can't read a GIF image in ASCII mode - GIF images are binary files, they must be read in binary mode. Because you 'attached' the file to the end of the script, it is probably already in ASCII mode anyway, so it probably wont display, but to read it from the data from the DATA handle safely (if in fact it is still in binary mode, which I doubt):
binmode(DATA); while(<DATA>) { # your gif image... } Make sure the file is read in binmode, although I would suggest making the file an external, binary file :) Hope this helps! r j o s e p h "Violence is a last resort of the incompetent" - Foundation
|