PRINTing images in CGI script (HTML tags reqd.)

Hello,
I have an image (a photo) in a variable (obtained from a MySQL database), eg. $ary[4]. I wish to display it in my Perl CGI script. My question is, the normal image tag ie. <IMG> takes a SRC parameter of a file, whereas I just want to PRINT the image in the variable. What tags must I surround it with?

Thanks.