perl5i: Method to turn an array into a hash
completed by: Prashan Dharmasena
mentors: Paul Johnson, Florian Ragwitz
See perl5i: Method to turn an array into a hash
I write this a lot:
my %hash = map { $_ => 1 } @array;
Usually because I want to check if there's an element in @array a lot.
So my %hash = @array->as_hash seems sensible. Should it do anything else?