Selten genug verzichte ich auf handgeschmiedete eigene Skripte –
#!/usr/bin/perl -w
use strict;
use LWP;
my $location = shift || die "Usage: $0 URL [file]\n";
my $file = shift;
# Add schema
$location = "http://" . $location unless $location =~ /^http/;
my $browser = LWP::UserAgent->new( );
# Acoid redirects
$browser->requests_redirectable([]);
my $response = $browser->get($location);
print "\n===== Status at '$location' =====\n\n", $response->status_line, "\n";
print "\n===== Headers at '$location' =====\n\n", $response->headers_as_string, "\n";
print "Show content? (y/n)? ";
my $show_content =
– und nutze stattdessen – wie jeder vernünftige Mensch – eine komfortable graphische Lösung. An HTTPClient und Sequel Pro komme ich allerdings auch nicht vorbei.