for (1..10) { print '.'; sleep 1; } $| = 1; # Turn off buffering for (1..10) { print '.'; sleep 1; }