Amoe has asked for the wisdom of the Perl Monks concerning the following question:

I posted a question here before regarding how to extract the plaintext content from an HTTP::Response. The kind people who responded directed me towards content() (or the documentation, hem-hem, which I had read but it seemed to yield no answers). My problem is: my script gets mostly binaries, and content() seems to screw these up majorly. Is there a function to return content without messing up binary stuff? (I don't know what the difference between them is, but the solution's probably fairly easy...) Thanks in advance.

Replies are listed 'Best First'.
Re: HTTP::Responses (again)
by merlyn (Sage) on Apr 20, 2001 at 16:38 UTC
    $response->content is byte-for-byte what your server sent. If a binary is messed up, either the sender is sending it bad, or you are not using binmode on the filehandle when you are saving it (since I'm guessing you're on a non-unix platform, but I may be wrong there).

    -- Randal L. Schwartz, Perl hacker

      Okay...binmode...*reads up*