in reply to Dereferencing code refs with & vs. ->()

doran wrote:

I prefer the former, since that's the way I'm used to dereferencing other things.

Yes, you and most everybody else. I've rarely seen the & version in the last five years.

But just about all examples I see use the '&' prefix instead of the arrow operator.

Really? Where are those examples? In books dating from 1998?

FWIW, TheDamian recommends the arrow form in Perl Best Practices. So, if nothing else, lots of other Perl programmers will understand what you're doing.

And that's what's most important.

Jim Keenan

  • Comment on Re: Dereferencing code refs with & vs. ->()

Replies are listed 'Best First'.
Re^2: Dereferencing code refs with & vs. ->()
by doran (Deacon) on Sep 23, 2005 at 08:20 UTC
    Really? Where are those examples? In books dating from 1998?
    Ummm, 1997 edition of the Panther book actually. :)

    It does mention the $thingy->() way of doing it, but all the other examples are the 'ol &$thingy way.