Help for this page

Select Code to Download


  1. or download this
    sub get_current_epoch {
        use Time::Local;
        my ($sec,$min,$hour,$mday,$mon,$year,$wday,$CURRENT,$isdst)=localt
    +ime(time);
        $EPOCH= timelocal($sec, $min, $hour, $mday, $mon, $year);
        return $EPOCH;
    }
    
  2. or download this
        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