#!/usr/bin/perl use strict; use warnings; my $seconds = 5; while (1) { my $time = localtime(); print $time, "\n"; sleep $seconds; }