qrazhan/perl5i — comment on commit 99e6b80ce70698c85478e826e6d420bcc4b6414c
File: t/pick.t line 16
By schwern:

Using `as_hash` is not safe, you cannot trust that values will be set to 1. It's only documented to have true values.

Because the values in %arr_hash happen to be set to 1 by `as_hash`, you've got one too many.

This is all better done in a single for loop.

for my $val (@$array) { $arr_hash{$val}++ }