in reply to CGI: print a gif directly from a print statement

On Win32, you need to declare binmode before printing "\r\n", otherwise, you'll actually get "\r\r\n", which will confuse the Browser. You also need to pack the bytes.

See On-demand single-pixel GIFs for a working example (it was developed on Win32).

  • Comment on Re: CGI: print a gif directly from a print statement