Sorry, i was totally wrong. It's a UserAgent header problem. For some reasons Wikipedia doesn't like LWP::Simple default header. But you can change it! (thanks to Dog and Pony for Getting more out of LWP::Simple)
use strict; use warnings; use LWP::Simple qw($ua get); $ua->agent('My agent/1.0'); my $url = "http://en.wikipedia.org/wiki/Hotel"; my $html = get $url || die "Timed out!"; print $html;
In reply to Re: LWP::Simple::get($url) does not work for some urls
by Gangabass
in thread LWP::Simple::get($url) does not work for some urls
by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |