in reply to LWP Simple - getstore function

Your concerrn is unfounded, getstore() retrieves files from URLs in binary mode just fine.

Besides, if it had been downloaded in text mode, it would be corrupted beyond repair.

Just download the file to its final destination, and it'll be fine. Or: use a temporary file name to download it to, and use rename to give it its final name, or even move the file to another directory, as long as it remains on the same disk.

Replies are listed 'Best First'.
Re^2: LWP Simple - getstore function
by tanger (Scribe) on Oct 31, 2004 at 07:19 UTC
    Ahh...thats what i thought. On the google group forums I read several posts telling how getstore retrieves binary finals just fine.

    That is why an hour and a half later I'm still sitting here trying to figure this out. I just tried your renaming method and no such luck. Image still comes out in Ascii format with the image hash text.

    :(
      Then it must be the server that sends it as text... or maybe the file is already corrupt on the server.

      I don't think you can see it properly directly in a browser either, can you? If, countrary to my expectations, you can, then check the MIME type (= content-type) the server says it is. It might say it's text/something.