my $arr = 1,'a',2,'b'; my $hash= {1,'a',2,'b'}; print join ':', @$arr1,2; print join ':',(@$hash{1,2});