$foo{ three } = $doit->( 1 );
$quux{ two } = get_that( 25 );
There. All better now :) (And (probably?) compatible with Perl 6)
I think it fails in at least three ways:
- When accessing a hash element, the sigil in Perl6 is %, not $.
- The autoquoting shortcut has been replaced with a construct that requires as many keystrokes as using quotes. I'm not quite sure what %foo{three} does in Perl6, but I think it's the same as %foo{three()}. The Perl5 equivalent of $foo{three} is %foo{'three'} or %foo<<three>>. The latter can also be written using some Latin-1/Unicode character, but I can't be bothered to look up its code. It's a character that isn't on a standard US keyboard. But someone out there who held on to his APL keyboard will be very happy with Perl6.
- The arrow is gone. Perl bows its head to Java, and uses a dot. So it's $doit.(1). Or maybe &doit.(1), just as one uses % to access a hash element.