in reply to the GD modul

in addition to gav^'s suggestion, I recommend Programming Web Graphics with PERL and GNU Software, which discusses the use of GD and GD::Graph, and is an good primer for working with them.