Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Re: Forward-referenceing subs

by ihb (Deacon)
on Jan 12, 2003 at 13:31 UTC ( #226264=note: print w/ replies, xml ) Need Help??

in reply to Re: Forward-referenceing subs
in thread Forward-referenceing subs

Yes, you can use the '&' symbol to call your subroutines (ie: &foo;), but IMO it makes things uglier.

Not only does it make it uglier, it also doesn't do the same thing. The issue is covered in perlfaq7, "What's the difference between calling a function as &foo and foo()?". I pointed out the very same thing in Re: Hash of Hash of Listed subroutines but then in the context of dereferencing subroutines. For some reason, it's much more common to drop the parenthesis when dereferencing than when making a regular subroutine call.


Comment on Re: Re: Forward-referenceing subs
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (20)
As of 2015-08-28 15:06 GMT
Find Nodes?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...

    Results (337 votes), past polls