while (($key, $val) = each(%hash)) { } # or by: foreach (keys(%hash)) { } #### # if I have my @arr = keys(%hash); # and @arr is for example: qw(4 7 2 1 9) # I would expect to get somehow @backwardsArr = qw(9 1 2 7 4);