Howto convert array to hash

The easiest and most idiomatic way is:

my %hash = map { $_, 1 } @array;

Leave a Reply

Your email address will not be published. Required fields are marked *