#! /usr/bin/env perl use strict; use warnings; use Getopt::Long; $| = 1; # unbuffered STDOUT GetOptions( \my %OPT, 'interval=i', ) or exit 255; die "(E) No interval specified.\n" unless $OPT{interval}; while ( 1 ) { print scalar(localtime), "\n"; sleep $OPT{interval}; } __END__