Hi,
you have an error here:
my $usefulans = grep { $$_[ 0 ] eq $answer } @$qablock;
With the assigmnent to $usefulans you force scalar context. That means you assign the length of the resulting grep operation to this variable. Afterwards you try to derefence it. I'm pretty sure that with strict and warnings you would have got the right hints.
Update: my $usefulans = [ grep { $$_[ 0 ] eq $answer } @$qablock ]; should solve your problem.
Best regards
McA
In reply to Re: grep and dereferencing an array of arrays
by McA
in thread grep and dereferencing an array of arrays
by oakb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |