in reply to Hashing multiple items
my %zones; $zones{B1} = [1,23,7,59]; my @this_coord = (5, 7); my ($x, $y) = @this_coord; while (my ($zone, $rng) = each %zones) { print "Zone is $zone\n" if $$rng[0]<=$x && $$rng[1] >=$x && $$rng[2]<=$y && $$rng[3]>=$y; } __OUTPUT__ Zone is B1
|
|---|