my $counter = 0; warn "\$counter initialized to <<$counter>>\n"; while( $counter != 10 ) { warn "Entering while block. \$counter is <<$counter>>\n"; $counter++; warn "End of while block. \$counter is <<$counter>>\n"; } warn "Loop terminated. \$counter is <<$counter>>\n";