in reply to a newbie to GD

On an unrelated note, your use of CGI is not quite right.
use CGI qw(:standard);
The qw(:standard) imports the standard CGI functions to your symbol table. This allows you to use CGI.pm in function oriented mode instead of object-oriented mode.
print header(-type=>'image/png'); # this works with qw(:standard)
That means you don't need to use the following:
print $query->header(-type=>'image/png'); # We don't need the OO versi +on
Exporting many of the functions involves a fair amount of overhead with CGI.pm. In fact, it's enough overhead that the OO use of CGI.pm is often as fast as (or faster) than the function oriented use. However, since you're importing the functions and using the object-oriented syntax, I would change your use CGI qw(:standard) line to use CGI. You won't need to change any of your other code and you can stick with the OO syntax.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.