#!/usr/bin/perl -w use strict; use POSIX qw(strftime); my $value=rand(100); $|=1; while(1) { sleep(1); print strftime("%H:%M:%S",localtime),",$value\n"; # jitter the value $value+=rand(2)-1; }