I'm a BRAND NEW to PERL and I'm looking for some help.

I've been given the task creating a script to do an alpha look up to an Eloquence DB. I'm connecting to it via an ODBC driver using DBI and DBD::ODBC. I seem to be able to connect to DB, and prepare and execute statements without error. However, whenever I try to fetch data, I get a Memory fault(coredump) error.

I don't know a thing about PERL, and I've ripped my entire script from various examples on the web.

Here's what I have:

#!/usr/bin/perl -w
use DBI;
my $username = 'public';
my $dsn = "DBI:ODBC:FRB";
my $dbh = DBI->connect($dsn, $username)
or die print $DBI::errstr;
my $sql_statement = 'SELECT * FROM CI_ACCOUNTS';
my $sth = $dbh->prepare($sql_statement) or die print "Can't prepare SQL: " . $dbh->errstr();
print $sth->rows;
print "\n";
while (my @ary = $sth->fetchrow_array()) {
print <<"END";
Field 1: $ary[0]
Field 2: $ary[1]
Field 3: $ary[2]
Field 4: $ary[3]

When I print the rows, I get -1, then the Memory fault error happens on the while statement. I'm running PERL 5.8.0; DBI 1.46, and DBD 1.13.

Is it my script? Or could it be that DBD::ODBC isn't playing well with the Eloquence ODBC driver? Any help is appreciated.