Last active
August 21, 2016 14:18
-
-
Save jasin/4e52c4718fd141c5ddfeab65ff68387a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
print "What site would you like to check?"; | |
my $site = <STDIN>; | |
print "What file would you lke to save to?"; | |
my $file = <STDIN>; | |
$file =~ s/[\n\r\f\t]//g; | |
my $content = getstore($site, $file); | |
die "Couldn't get it!" unless defined $content; | |
my $hashref = head($site); | |
die "Couldn't get it!" unless defined $hashref->header('content_type'); | |
print($hashref->as_string()); | |
print "Site is $site\n"; | |
print "file is $file\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment