use Time::HiRes qw(sleep); my $n = shift @ARGV; for (my $i = 0; $i < $n; $i++) { print "\x07"; # beep sleep(0.25); }