in reply to Re: Effecicncy of key-only hash
in thread Effecicncy of key-only hash

I know it isn't my thread but I had to ask: Can you please explain what you are doing here:
undef(@hash{qw(shave the modern way)});
Why you accessing a hash as an array ? ('@' char)? I am missing something I think ...

Replies are listed 'Best First'.
Re^3: Effecicncy of key-only hash
by moritz (Cardinal) on Aug 24, 2008 at 08:48 UTC
    The @ tells you that what you expect to return is an array, and the curly braces {...} tell you that what you access is a hash.

    qw(shave the modern way) is a list, so @hash{qw(shave the modern way)} is a list ("slice") of items in %hash with the listed keys.

Re^3: Effecicncy of key-only hash
by FunkyMonk (Bishop) on Aug 24, 2008 at 08:55 UTC
    It's a hash slice. See perldata for more information on hash and array slices