Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: A question of style

by ZZamboni (Curate)
on Aug 23, 2000 at 03:03 UTC ( #29130=note: print w/replies, xml ) Need Help??

in reply to A question of style

I think it's entirely a matter of personal taste. I also try to avoid the ampersand whenever possible, using parenthesis after its name (empty if there are no arguments) to make it clear that it's a function call.

There is at least one case, though, in which the ampersand has a very specific use: if you write "&func" (this is, with ampersand and without parenthesis) the function will be called with the contents of @_ as arguments. I don't know where this is documented; I learned it from Conway's OO-perl book.

Other uses for the ampersand include de-referencing code references.


Replies are listed 'Best First'.
RE (tilly) 2: A question of style
by tilly (Archbishop) on Aug 23, 2000 at 03:53 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://29130]
[Eily]: looks more like "all my plates are broken and I don't understand why. Also I can't retrieve the broken parts because the elephant in the room is on the way"
[ambrus]: Eily: also webpages aren't displayed on my monitor no matter what I click with the mouse, and there's a blackout right now, could that be a problem?
[robby_dobby]: ambrus: Yes
[hippo]: erix++: "the browser ate my code"
[robby_dobby]: Eily: Now, people are trying to be inventive with crowdsourcing their work, eh? Sure, call on the admins to k-line these sockpuppet accounts!
[robby_dobby]: hippo: I like how you equated your browser to a dog....

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-04-25 13:13 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (454 votes). Check out past polls.