The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
use Smart::Comments;
use Test::More 'no_plan';

close *STDERR;
my $STDERR = q{};
open *STDERR, '>', \$STDERR;

my $count = 0;

LABEL:

while ($count < 100) {    ### Simple while loop:===|   done
    $count++;
}

like $STDERR, qr/Simple while loop:|                 done\r/
                                            => 'First iteration';

like $STDERR, qr/Simple while loop:=|                done\r/ 
                                            => 'Second iteration';