Perl Mechanize Infinite Scrill с подсчетом попыток

while( $mech->infinite_scroll ) {
    # Tests for exiting the loop earlier
    last if $count++ >= 10;
}
Vternal3