in reply to Replace Hash-Ref with Array-Ref
I want that at the end $ref contains a reference to $ref->{baz}.
use Data::Dumper; my $ref = { "baz" => [1,2,3,4] }; print Dumper $ref; sub bazify {return $_[0]->{baz} }; $ref = bazify($ref); print Dumper $ref;
update: note that it is not a reference to $ref->{baz}, but its value (which is a ref to an anonymous array)
|
|---|