in reply to system() frustration

s/<IMG SRC=//i; # strip off the front of the tag s/><\/a>//i; # strip off the back of the tag
IMG tags in HTML have no back tag, that is, it's unary tag. Your second regex should be s/>//i, otherwise, since not all images are in anchors, you'd be leaving the trailing >, and http://some.com/image.jpg> would be empty from most servers.

but as someone else pointed out, it's easier to just grab the image from one regex.