use feature qw(state); sub st3_look { my $cells = shift; state $points_str = [ map { join ':', @{$_} } @points ]; for my $p (@{ $points_str }) { exists $cells->{$p} or die; } exists $cells->{'notfound'} and die; exists $cells->{'notfound2'} and die; exists $cells->{'notfound3'} and die; }