Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://226264]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2017-07-24 23:27 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (361 votes). Check out past polls.