From the
LWP::Simple manpage description of get():
You will not be able to examine the response code or response headers (like 'Content-Type') when you are accessing the web using this function. If you need that information you should use the full OO interface (see the LWP::UserAgent manpage).
Using LWP::UserAgent, you'll get back something that implements
HTTP::Headers, so you can just call its content_type() method.