Array initialization in Perl
If I understand you, perhaps you don’t need an array of zeroes; rather, you need a hash. The hash keys will be the values in the other array and the hash values will be the number of times the value exists in the other array: use strict; use warnings; my @other_array = (0,0,0,1,2,2,3,3,3,4); my %tallies; … Read more