http://www.perlmonks.org?node_id=120208


in reply to LWP to download images, how to let LWP decide, wether it is an image or not?

hihi.

I haven't tested this yet myself, but since HTTP::Response is a subclass of HTTP::Message, you should be able to:

if ($res->content_type =~ /^image\//) { ...