#!/usr/bin/perl use strict; use warnings; $|++; my $count = 10; while ($count--) { print "\r$count"; sleep(1); if ($count == 1) { print "Boom\n"; exit 0; } }