in reply to How to display the response from a get request to a browser?

How does printing the recieved HTML work? You see the HTML code, right?

Same thing happens when you print() your imag: it doesn't just magically transform into a nice picture - you see the image data, which can be any kind of image format. Try printing it to a file, and then running an external image viewer; the display command from image-magick might be useful.

Also, your HTTP code is broken for a lot of possible responses. I would strongly recommend you use LWP::UserAgent instead.

Replies are listed 'Best First'.
Re^2: How to display the response from a get request to a browser?
by unb (Initiate) on Oct 27, 2004 at 15:52 UTC
    Thanks, that would be helpful. But can you show me how to use the display command from image-magick
    Thanks
        Hi
        thanks for the code, I tried using:
         system("display $image_filename") and die "Error running display";
        after storing the set of characters in a file represented by $image_file. but nothing happened I wounder if I need to import the image-magick library with (use), or add something else.
        thank you,
        unb