Below is the code
my $results = $session->array_of_hash_for_cursor("check_if_receipts_exist", 0, @params);
next if( scalar @{$results} <= 0 );
$logger->info("Retrieved number of records: ".scalar @$results);
foreach my $row( sort { $results->{$b}->{epoch_received_date} cmp $results->{$a}->{epoch_received_date} } keys %{$results} )
{
//logic
}
'check_if_receipts_exists' is a SQL query which returns some results. Which I try to execute this, I am getting the following error, Bad index while coercing array into hash
I am new to Perl. Can someone please point out the mistake I am making?
$sessioncoming from?