http://qs321.pair.com?node_id=11150803


in reply to Re^2: Add a fixed number of unique elements to hash
in thread Add a fixed number of unique elements to hash

Be careful with List::AllUtils. "All" isn't really "all". At least frequency from List::MoreUtils is missing. I prefer to use the original modules.

Greetings,
-jo

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

Replies are listed 'Best First'.
Re^4: Add a fixed number of unique elements to hash
by tybalt89 (Monsignor) on Mar 06, 2023 at 21:57 UTC

    Probably because of

    use List::AllUtils qw( count_by ); %frequencies = count_by { $_ } LIST;