Re: adding date to form
- #!/usr/local/bin/perl -w
my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday ) =
$yday = sprintf( "%02d:%02d:%02d %02d-%02d-%4d", $hour, $min,
$sec, $mday, $mon, $year + 1900 );
I know the call to localtime() could be simplified.
I used sprintf() because I read it is more efficient than printf but,
of course, I can't find where I read this.
Now you have the info, you can print it with your CGI/HTML output as
--- In perl-beginner@y..., Chanda Adams <adams@g...> wrote:
> is there a command that will simply add the date to a cgi script
> be emailed? I know it's on the email, but in the form would be
> Chanda Adams