note
McA
<p>Ok, that puts some light on your problem. This may be your solution:</p>
<code>
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Data::Dumper;
my $choices = [
[
'a',
'W',
'interupt',
],
[
'b',
'R',
'interrupt',
],
[
'c',
'W',
'innterupt',
],
[
'd',
'W',
'intterupt',
]
];
my $answer = 'd';
# As we know that the answer matches only one choice
# and we have exactly one matching answer.
my $chosen_answer = (grep { $_->[0] eq $answer } @$choices)[0];
say Dumper($chosen_answer);
</code>
<p>McA</p>
1052748
1052758