in reply to Print max count of repeated consecutive numbers in an array

If you'd like to use a sledgehammer to crack a nut:

#!/usr/bin/perl use v5.16; use strict; use warnings; use PDL; my $list = long(2,2,2,3,3,4,4); my $rle = long(rle $list); my $ind = maximum_ind $rle->slice('X,(0)'); say $rle->slice("($ind)");

Greetings,
-jo

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