It depends on what exactly you want to do. But a good start would be GD.pm. With that package you can draw almost anything, and output it as JPG or PNG (GIF is not supported anymore since the Unisys guys started making a fuss about LZH compression...)
HTH,
Jouke Visser
Perl Application Developer