I would like to see a renaissance of this kind of word. Nymphomaniac is ever so much nicer than slut.
To lessen the impact of certain epithets leveled against my own self and several generations of my kin I humbly request that we replace another class of brutish nouns with dipsomaniac.
[close]
Permanent link · http://querylog.com/q/nymphomaniac
Suggested HTML for linking:
Link preview: nymphomaniac
That’s a somewhat tall order. Unlike a file system which allows you to ask, “Does file X exist?” the web is more like, “Show me file/resource X or tell me why you won’t/can’t.”
This would do the trick for many cases though.
use strict;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
$mech->agent_alias('Windows IE 6');
my $uri_to_check = shift || die "Give a URI!\n";
$mech->get( $uri_to_check );
if ( $mech->success )
{
print "Valid: $uri_to_check\n";
}
else
{
warn "Invalid! $uri_to_check\n";
warn " Status: ", $mech->status(), "\n";
}
There are much more simple and idiomatic ways to write that—even in one line—using something like LWP instead of WWW::Mechanize. It has additional problems though in that some servers won’t take requests from LWP so you might get false negatives unless you call your requesting agent a standard browser name as we do with the alias() above.
[close]
Permanent link · http://querylog.com/q/perl+cgi+url+exists