Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: How to call a sub-routine ref

by PrakashK (Pilgrim)
on Oct 19, 2012 at 18:43 UTC ( #1000017=note: print w/ replies, xml ) Need Help??

in reply to How to call a sub-routine ref

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:


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{...}

Replies are listed 'Best First'.
Re^2: How to call a sub-routine ref
by greengaroo (Hermit) on Oct 19, 2012 at 20:08 UTC

    You are right, I forgot the "&". Fixed.

    And I agree with what you are saying.

    There are no stupid questions, but there are a lot of inquisitive idiots.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000017]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2016-08-26 21:09 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (375 votes). Check out past polls.