On 2009 Jan 11, at 3:50, Richard Hainsworth wrote:
To be precise - why the ':' after the sort?

'%players.sort' calls the 'sort' method/sub on the hash '%players'. '{.value}' runs '.value' on $_ at some point. But when?

So once again, what is the ':' doing? How else could this code be written?


I think I have this right: perl5 has indirect object syntax, which is ambiguous (the parse of a program can change by whether perl5 had previously seen a sub by that name).

In perl6, the colon is required to signify an indirect object, even if there are no following parameters.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


Reply via email to