use dbS::Sybase::Parse::SQL_File qw(open_file next_batch); .... if ( my $batch = dbS::Sybase::Parse::SQL_File::batch("SQL/SNAP.sql") ) { print "-"x40 . "\n"; print " Performing IGOR\n"; print "-"x40 . "\n"; while ( my $sql_batch = $batch->next ) { dbh_do($local_dbh, $sql_batch); } }