Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: How to call a sub-routine ref

by Kenosis (Priest)
on Oct 19, 2012 at 18:33 UTC ( #1000011=note: print w/ replies, xml ) Need Help??

in reply to How to call a sub-routine ref

I prefer the arrow operator since it provides a nice, overt dereferencing visual suggesting it's pointing or referring to something else.

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

    And if you don't have an argument to pass, isn't it weird to have empty parenthesis?


    There are no stupid questions, but there are a lot of inquisitive idiots.
      Why would it be weird? Parens around the arg list, even an empty args list, is the normal way of calling a sub. Omitting parens leads to many problems.


      As a long-time C/C++/C# coder, I don't find the empty parenthesis weird. (Though it took me a (very) little while getting used to leaving off parenthesis altogether.)


      When your only tool is a hammer, all problems look like your thumb.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2015-11-26 20:57 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (707 votes), past polls