I'm using the DBI fetchall_arrayref to get the rows from an Oracle SQL statement. (I'm using this one as I do not expect many hits.) There are valid conditions when now rows are found.
my $result_array = $sth->fetchall_arrayref;
foreach my $row (@{$result_array}) {
print join (",", @$row),"\n";
print FH join (",", @$row),"\n";
}
If I put
print "==>@{$result_array}<==\n";
after the fetchall I get "==><==" which indicates an empty string. Testing for this with the following doesn’t seem to work.
if (@{$result_array} eq “”) {
<some message>
} else {
<do the output>
}
How do I test for the "nothing here" condition.
Paradise: Florida, full tank of gas, no appointments.