Skip to content

Instantly share code, notes, and snippets.

Created May 6, 2010 17:45
What would you like to do?
use DBI;
use LWP::Simple;
my $dbh = DBI->connect("dbi:SQLite:dbname=servers.sqlite3","","");
my $sth = $dbh->prepare("CREATE TABLE servertypes (name varchar(255));");
if(defined $sth)
my @hosts=("","","");
foreach( @hosts)
my $host=$_;
print "Checking $host ...\n";
my $type=head($host)->server."\n";
my $sth=$dbh->prepare("INSERT INTO servertypes VALUES ('$type');");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment