#!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 ); }