Further to hippo's post:
... something in the steps you are not showing us.
misterperl: It's easy to contrive that scenario entirely separate from debug mode:
c:\@Work\Perl\monks>perl -wMstrict -le
"$_ = '1223w3433.45+34';
;;
/\d\D*/g;
printf qq{'$&' } while /\d\D*/g;
"
'2' '2' '3w' '3' '4' '3' '3.' '4' '5+' '3' '4'
m//g in scalar or void context "remembers" the point at which a previous match ended and continues matching from that point. See
pos.
Update: See what happens if the side-effect-producing, void context
/\d\D*/g;
statement is changed to
() = /\d\D*/g;
(i.e., if list context is imposed).
Give a man a fish: <%-{-{-{-<