Yes, just try it – and see what happens with Data::Dumper or any of its ilk. (Also nice to use strictures and warnings!)
>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' ];
In reply to Re: passing array ref without variable
by AnomalousMonk
in thread passing array ref without variable
by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |