If you are going to use LWP to get files from that server, you can get information back from the HTTP header.
Look into the HTTP::Response module for your user agent. From there call
my $hdrs = $response->headers();
to get the HTTP::Headers object from the server.
From there you'll be looking to use
$hdrs->content_type; # this returns a lowercase string