... open( SQL, 'somefile') or die $!; my @statements = split(/;\n/,join('',)); for my $stmt( @statements ){ $dbh->do($_); }