OK I am beyond confused.
Changed my code as follows:
$sqlStr = "select createwbparserun( '$directory' , '$filename' )
+ ";
print $sqlStr. "\n" ;
my $sth = $db_in->prepare( $sqlStr );
$sth->execute();
my $aryRef = $sth->fetchall_arrayref([0]);
my @a = @$aryRef;
print "Reference: $aryRef\n";
print "Dereferenced: @a\n";
##print @$ary;
print Dumper @a;
$wb_runkey = $a[0];
print "WORKBOOK run key: " . $wb_runkey . "\n" ;
die;
and got the following:
select createwbparserun( 'C:/dev/HN_optimum/' , 'FM Mk 14 - 60M200007_
+DB200609.xls' )
Reference: ARRAY(0x351fed8)
Dereferenced: ARRAY(0xcf786a0)
$VAR1 = [
'48'
];
WORKBOOK run key: ARRAY(0xcf786a0)
Died at parseExcelWB.pl line 197.
the DBI documentation says, fetchall_arrayref returns a reference to an array that contains one reference per row. Does this mean I have to de-reference again?? Do not know how to do that.
Best
KD