in reply to How to add timer

I made a weak q&d attempt using fork (I've never used it before), but perhaps it may provide an idea. It would also be worth looking at modules that could help with this as others have suggested.

It's ugly, but I had to try out fork sometime ;)

#!/usr/bin/perl use strict; use warnings; my $pid = fork(); my $doing_something = 1; while ( $doing_something ) { if ( $pid == 0 ) { # we're the child do_time_function(); sleep 10; } } print "I'm the parent, and I can do other stuff " . "while the child is waiting to update the " . "time stamp...\n"; sub do_time_function { print "blah, timestamp updated\n";

Steve