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)
In reply to Re: Replace Hash-Ref with Array-Ref
by brx
in thread Replace Hash-Ref with Array-Ref
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |