/usr/share/doc/libdbd-odbc-perl/examples/testundef.pl is in libdbd-odbc-perl 1.45-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #!/usr/bin/perl
#perl -w
# $Id$
use DBI;
my $dbh = DBI->connect()
or die "$DBI::errstr\n";
eval {
# if it's not already created, the eval will silently ignore this
$dbh->do("drop table longtest;");
};
$dbh->do("create table hashtest (id integer, value varchar2(200))");
my %foo;
$foo{1} = "bless me";
DBI->trace(9,"c:/trace.txt");
my $sth = $dbh->prepare("insert into hashtest values (?, ?)");
$sth->execute((2, $foo{2}));
$sth->execute((1, $foo{1}));
my $sth2 = $dbh->prepare("select id, value from hashtest order by id");
$sth2->execute;
my @row;
while (@row = $sth2->fetch) {
print join(', ', @row), "\n";
}
$dbh->disconnect;
|