in reply to Identifying PDF from URLs
without fetching at least the http header there's no way to determine the file type. If the file type is not set correctly you could fetch the body with LWP::Simple::get and then feed this to MIME::Types (after writing it to a file if necessary).use LWP::Simple qw/ head /; my ($content_type) = head($url);
update: btw, your example url is simply html. but it has an iframe whose source links to a pdf.
|
|---|