Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone explain why the following code:
should push the error for the URL quoted and for http://www.quickwebmail.com but not for any other genuine URL I've tested it on? BTW, "get" works fine on them. According to LWPguru, Gisle Aas, the above construct can be used to test for the existence of a web page, and until today, that's always been true.#!/usr/bin/perl use LWP::Simple; unless (head('http://www.123box.co.uk')) { push (@error,"$FORM{'url'} head error."); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: LWP head mystery
by merlyn (Sage) on Oct 06, 2001 at 19:58 UTC | |
by Elliott (Pilgrim) on Oct 07, 2001 at 01:23 UTC | |
by pjf (Curate) on Oct 07, 2001 at 02:19 UTC | |
by Anonymous Monk on May 06, 2014 at 09:15 UTC | |
Re: LWP head mystery
by miyagawa (Chaplain) on Oct 06, 2001 at 12:59 UTC | |
Re: LWP head mystery
by blakem (Monsignor) on Oct 06, 2001 at 13:04 UTC |
Back to
Seekers of Perl Wisdom