sarvan has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for the help in getting to know the what the url points to..
As suggested, with the help of LWP::UserAgent i now got the content type the pages points to..
The above code is what the suggestion i got and worked..use LWP::UserAgent; my $url = "http://de.arxiv.org/pdf/1106.3541"; print LWP::UserAgent->new->head($url)->headers->content_type()
Now my question is, the 3rd line in the code prints the content-type of the given url. How do i access the values of content_type(). If i want to access it.. I mean i want to use that as a input for another if condition..
Any suggestion
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP:UserAgent usage
by Tanktalus (Canon) on Jun 22, 2011 at 04:47 UTC |