my @readable = $s->can_read(1); for my $fh (@readable) { my ($index) = grep { $hashes[$_]{child_fh} == $fh } 0..$#hashes; die("object not found in \$hashes!\n") if not defined $index; ... }