On Fri, Nov 23, 2007 at 01:12:37PM -0500, Uri Guttman wrote:
> isa
> is a key valid? (not same as in a set). isa usually works on
> fixed sets of keys
>
> my @foos = qw( axxj djdj whwh ) ;
> my %is_a_foo = map { $_ => 1 } @foos
I don't have any additional uses for hashes to add, but I do have a
great hash initializer I picked up from Damian when he was in town a
few years ago (borrowing from your example):
my @foos = qw( axxj djdj whwh ) ;
my %is_a_foo;
@[EMAIL PROTECTED] = (1) x @foos;
It runs *way* faster than the $_ aliasing does in the map (at least by
my benches). I thought that was fun when I saw it.
Scott
--
Scott Wiersdorf
[EMAIL PROTECTED]