#!/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";