http://www.perlmonks.org?node_id=1029897


in reply to Re^6: Threading in a loop
in thread Threading in a loop

This will not always be synchronized. It is possible that in loop "n" it will print $test after the increment and in loop "n+1" it will print before the increment, thus printing the same number twice. Similarly, it could skip a number.