CUFP
spatterson
snippet
<div class="Description">I sometimes need to check exactly what data a webserver has returned for a URL without letting a browser interfere & reinterpret any of it, so this perl script follows me around.
<p>
It will print out the HTTP header (including cookies) and the full body for a URL given on the command line.</div>
<CODE>
#!/usr/bin/perl -w
use LWP::UserAgent;
my $ua = LWP::UserAgent->new(
keep_alive => 1,
timeout => 30,
debug => 1
);
my $body = $ua->get($ARGV[0]);
print $body->as_string;
</CODE>