in reply to DBI fetchall_arrayref

If you're fetching into an array, use fetchrow_array.

$sqlStr = "select createwbparserun('$directory','$filename')"; print "$sqlStr\n"; my $sth = $db_in->prepare($sqlStr); $sth->execute(); if (my @aRow = $sth->fetchrow_array) { print Dumper \@aRow; $wb_runkey = $aRow[0]; print "WORKBOOK run key: " . $wb_runkey . "\n"; }

A similar example using fetchrow_arrayref would be:

#... same preamble as before ... if (my $aRow = $sth->fetchrow_arrayref) { print Dumper $aRow; $wb_runkey = $aRow->[0]; print "WORKBOOK run key: " . $wb_runkey . "\n"; }