#! perl use strict; use warnings; my %animals = ( pets => [ qw( cat dog hamster ) ], non => [ qw( rhino giraffe ) ], ); for my $i (0 .. $#{ $animals{pets} }) { print "$i: ", $animals{pets}->[$i], "\n"; } #### 1:43 >perl 857_SoPW.pl 0: cat 1: dog 2: hamster 1:43 >