foreach (@{$camArray{$trafficArea}}) { print "$_->[0]\n"; # for the label print "$_->[1]\n"; # for the value }