>perl -wMstrict -le "use Data::Dumper; my %hash = qw(a 1 b 2 c 3 d 4); my_function([keys %hash]); sub my_function { my $arr_ref = shift; print Dumper $arr_ref; } " $VAR1 = [ 'c', 'a', 'b', 'd' ];