sub get_current_epoch { use Time::Local; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$CURRENT,$isdst)=localtime(time); $EPOCH= timelocal($sec, $min, $hour, $mday, $mon, $year); return $EPOCH; } #### my $random = rand 999; #seeds and gets a random no. up to 999 $random = sprintf("%0.3d",$random); #fills in leading zeros $my ID = &get_current_epoch . $random; #uses above subroutine