"Lars Henrik Mathiesen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
[...]
| What I've sometimes wished for is some way of dereffing to a hash or
| array using -> or some related postfix thing. So instead of
|
| my $aref = $hash{foo};
| for my $key ( keys %$aref ) { print $hash{bar}->{$key} }
|
| or
|
| for my $key ( keys %{ $hash{foo} } ) { print $hash{bar}->{$key} }
|
| I would like to write
|
| for my $key ( $hash{foo}->keys ) { print $hash{bar}->{$key} }
|
| or even
|
| for my $key ( keys $hash{foo}->% ) { print $hash{bar}->{$key} }
I think I vaguely remember from one of Damian's talks that all built-ins in
Perl 6 will in fact be indirect object syntax. So you could actually do
%hash->keys.
I don't know about the dereferencing issue, though. DWIM?
Please, correct me if I horribly misunderstood an important aspect of that
talk. It might well be the fact as it was one of the 8 o'clock in the
morning speeches during which I hadn't had my daily caffeine injection yet.
And I was still wrapping my mind around SelfGol and enjoying the Australian
accent. (Which - opposing my German/American/British accent - has a pleasant
ring to it.)
Steffen
--
$_=qq#tsee gmx.net#;s#e#s#g;s#[^\s\w]#c#;s#s#ust#g;s#t#J#e;s#nus#ker#
;chop;$c=' ^^^^ ';$c='12319';@c=split/(..)/,'8234130006710523';@d=split"3"
,$c;chop;' at ';s#(t)ustust#$1\0ano$1;.#;y#.; #ehr#;@_=$_;shift@c,substr
$_[0],$_,1,chr(ord(substr$_[0],$_)-shift@c)for$d[0]..$d[1];print"$_[0]\n";