Great User Interface

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 = ; chomp($show_content); print "\n===== Content at '$location' =====\n\n", $response->content, "\n" if $show_content eq 'y'; if ($file) { # Store the page content in $file open (FILE, ">$file") or die "Cannot open $file!"; print FILE $response->status_line, $response->headers_as_string, $response->content; close FILE; }

– und nutze stattdessen – wie jeder vernünftige Mensch – eine komfortable graphische Lösung. An HTTPClient und Sequel Pro komme ich allerdings auch nicht vorbei.