I just installed Strawberryperl 10.0.1 on windows xp and I am trying to connect to Oracle. My code looks like this
#! /usr/bin/perl
use DBI;
use strict;
use warnings;
print "Hello.\n";
my $dsn = 'dbi:Oracle:sid=ORCL';
my $user = 'MyID';
my $password = 'MyPWD';
my $dbh = DBI->connect($dsn,$user,$password,RaiseError => 1, AutoCommi
+t => 0)
|| die "Database connection failed: $DBI::errstr";
print "Database connection succeeded.\n";
$dbh->disconnect();
print "Bye, bye ;-)\n";
exit
When I run the script I get the "Hello" message, and 2 perl messages.
Can't use string ("1") as a HASH ref while "strict refs" in use at ../strawberry/perl/site/lib/DBI.pm line 560.
DBI->connect using 'old-style' syntax is deprected and will be in error in future versions at DBITest.prl line 24.
I'm not too concerned about the syntax message, but obviously the first message is a showstopper.
Can somebody help me out with the message from DBI.pm and, if possible, point me to some documentation on the 'new-style' syntax?
Thanks