in reply to Curl Header ONLY!

I cannot comment on WWW:Mechanize or WWW::Curl (having never used them), but with respect to LWP::UserAgent, how did you attempt to make the request? As I understand it, the following *SHOULD* just make a HEAD request to the server, as you are wanting:

perl -Mstrict -Mwarnings -MLWP::UserAgent -le 'my $ua = LWP::UserAgent +->new; my $header = $ua->head( $ARGV[0] ); print $header->code;' 'htt +p://example.org/'

On my local machine to the Internet, the request there took approximately 0.18s, vs. 0.06s for 'curl -I' to the same site.

Hope that helps.

Replies are listed 'Best First'.
Re^2: Curl Header ONLY!
by omegaweaponZ (Beadle) on Jan 03, 2014 at 16:58 UTC
    Yup absolutely. There is a head command on this, which can be used in mechanize. Easy!