On Wed, 10 Mar 2004, Larry Wall wrote: > You subscript hashes with {...} historically, or these days, «...», > when you want constant subscripts. So what you're looking for is > something like: > > if / <?foo> ... <?baz> ... { $?foo{'baz'} ... $?baz } .../ > or > if / <?foo> ... <?baz> ... { $?foo«baz» ... $?baz } .../
I'm probably a bit behind on current thinking, but did %hash{bareword} lose the ability to assume the bareword is a constant string? And why «»? Last I heard, that was the unicode version of qw(), which returns an array. Using an array constructor as a hash subscriptor is not a "least surprise" to me. ~ John Williams