Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: Forward-referenceing subs

by ihb (Deacon)
on Jan 12, 2003 at 13:31 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-03-28 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found