Help for this page

Select Code to Download


  1. or download this
    use DBI;
    use Data::Dumper;
    ...
    $sth->execute(@$_) for [1,'moe'],[2,'curly'],[3,'larry'];
    
    print Dumper $dbh->selectall_arrayref('select * from foo');
    
  2. or download this
    $dbh->do('create table foo(id integer primary key, name char(64))');
    
    my $sth = $dbh->prepare('insert into foo(name) values (?)');
    $sth->execute($_) for qw(moe curry lary);