okay. i'm trying to work out exactly what are you trying to do.
so far i've been able to gather that you're using perl to draw the image, which is being called from wherever. that sounds fine.
am i right in thinking that the data upon which the perl script bases the image is coming from a php script?
now: are you using unix, and if you are, can you run php at the command line? you can test this by having a look in the usual /bin/ directories and seeing if php is in there, or just by typing "php <scriptname>" at the prompt.
if this test suceeds, then you can probably call the php directly from your perl script. if not, then you might be able to use SSI, but i've never used it myself, so you will have to look elsewhere for enlightenment ;-)
so; the answer is probably yes: it is possible. it sounds like going an awful way around the houses, though.
--
rad