Output:use strict; use warnings; my $qablock = [ [qw(r0c0 r0c1 r0c2)], [qw(r1c0 r1c1 r1c2)], [qw(r2c0 r2c1 r2c2)], ]; my $answer = 'r1c0'; my ($usefulans) = grep {$$_[0] eq $answer} @$qablock; print "\t\t----> @$usefulans\n";
----> r1c0 r1c1 r1c2
In reply to Re: grep and dereferencing an array of arrays
by BillKSmith
in thread grep and dereferencing an array of arrays
by oakb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |