in reply to GD::Graph in HTML

What you're actually doing is printing a PNG image into the HTML document, which is a bunch of binary data (thus the jiberish). The HTML source tag needs a file which sends back an image, but that file could be a CGI. So what you can do is make a regular HTML document which contains an image tag pointing to your CGI. That CGI will just print out the PNG image data (print $myimage;, no HTML needed in the output).

----
send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.