Syntactic Confectionery Delight | |
PerlMonks |
Re^4: hash deref confusion: Intermediate Perlby tobyink (Canon) |
on Jul 30, 2012 at 08:30 UTC ( [id://984388]=note: print w/replies, xml ) | Need Help?? |
That's not specific to slices though. In Perl 6 sigils are not context-dependent; they are variable-dependent and context-invariant. In Perl 5, where sigils are used to indicate context, using @ for hash slices is pretty consistent with the rest of the language.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|