Is the first one even correct? I get the Useless use of private variable in void context warning, when warnings are enabled.
Or, did you mean to say:
&$ref();
I prefer the second one, as it feels more consistent with the way the other references are used as well:
$aref->[...]; # as opposed to @$ref[...] $href->{...}; # as opposed to %$ref{...}
In reply to Re: How to call a sub-routine ref
by PrakashK
in thread How to call a sub-routine ref
by greengaroo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |