1234567891011121314151617
#!/usr/bin/perluse strict;use warnings;use Data::Dumper;my %hash = ( 'users' => ['user1', 'user2', 'user3']);my $users = $hash{'users'};print Dumper $users;print "Index highest user: ", $#{$users}, "\n";for (0..$#{$users}) { print "Index searched user: ", $_, "\n" if $users->[$_] eq 'user2';}