sub getOracleRowHahs{ my $odbh = DBI->connect($oracledsn, $oracleuser, $oraclepass) || die "Can't connect to oracle db:$DBI::errstr\n"; my $osth = $odbh->prepare("select * from emp"); $osth->execute(); my $tableref; while(my $row = $osth->fetchrow_hashref()){ no warnings; $tableref->{$row->{'PK'}} = $row; } $odbh->disconnect(); return $tableref; }