Help for this page

Select Code to Download


  1. or download this
    my %attr = ( RaiseError => 1);  #auto die with error printout
    my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","","",\%attr)
        or die "Couldn't connect to database $dbfile: " . DBI->errstr;
    
  2. or download this
    $dbh->begin_work;
    foreach my $row_hash_ref (@$result){
    ...
      $update->execute(@$row_hash_ref{@$col_arrayref},$row_hash_ref->{rowi
    +d});
    }  
    $dbh->commit;