Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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.

ihb


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2014-09-16 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (32 votes), past polls