in reply to Using a perl script as a graphic?

Content-type *must* be the first header printed by the script, followed by any other optional headers (like size).