#!/usr/bin/perl $|=1; while(1) { print "tick\r"; sleep 1; print "tock\r"; sleep 1; }