Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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 meditating upon the Monastery: (7)
As of 2017-03-30 17:27 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (362 votes). Check out past polls.