use warnings; use strict; use LWP::Simple; use DBI; my $data = ''; my $dbh = ''; my $url = 'http://www.perlmonks.org/?node_id=207304'; my $pat = qr{ .*(.*)<\/author>.*(.*)<\/text }xs; $data = get( $url ); $dbh = DBI->connect( "dbi:SQLite:dbname=C:\\testdb", "", "" ); while ( ( my($auth, $text) = ( $data =~ m/$pat/gc ) ) ) { for( $text ) { s/[ ]+/ /g; s/^\s+//; s/\s+$//; } printf "%s: %s\n\n" , $auth , $text; $dbh->do('insert into monks values(?,?)', undef, $auth, $text ); } #### CREATE TABLE monks( monk varchar(25), comment varchar(255) );