#! perl -slw use strict; $| = 1; print 'Perl version is: ', $]; my $n; for $n ( 1 .. 100 ) { printf "\r%d", $n; last if $n == 50; } print "\nThe value of the counter after the loop is $n"; __END__ P:\test>perl5.6.1 junk.pl8 Perl version is: 5.006001 50Use of uninitialized value in concatenation (.) or string at junk.pl8 line 14. The value of the counter after the loop is P:\test>junk.pl8 Perl version is: 5.008 50Use of uninitialized value in concatenation (.) or string at P:\test\junk.pl8 line 14. The value of the counter after the loop is