in reply to XML Feed to MySQL

DBD::AnyData can create in-memory databases from remote XML data sources so you could scrape and insert with no parsing or file saves (although you could easily keep a file copy by adding a single line). It uses LWP and XML::Twig in the background.
#!perl -w use strict; use DBI; my $dbh_a=('dbi:AnyData(RaiseError=1):'); my $dbh_m=( $mysql_dsn ); $dbh_a->ad_import( 'temp','XML', $remote_url); my $select = $dbh_a->prepare("SELECT $colnames FROM temp"); my $insert = $dbh_m->prepare(" INSERT INTO $mysqlTable ($colnames) VALUES ($placeholder_str) "); $select->execute; while( my $row = $select->fetch ) { $insert->execute( @$row ); }
update - added a line # I forgot to show the mysql connect