in reply to Time-stamping a report entry in Perl4

Both of the previous answers require perl 5 (and I encourage you to install perl 5, btw).

But for a perl 4 answer you need to look at the time() function (which returns seconds since the epoch), and the localtime() function (which returns an array of items). Basic usage would look something like this:

$secs = time(); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secs); $year += 1900; @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul' 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); printf("%2.2d-%3s-%4d", $mday, $mname[$mon], $year);

Michael

Replies are listed 'Best First'.
Re: Re: time
by johnsopg (Initiate) on Jun 17, 2002 at 18:46 UTC
    Perfect, Thanks Michael