Gossamer Forum
Home : General : Perl Programming :

Print Date

Quote Reply
Print Date
Bit of a newbie question...

I'm trying to print the date to the page with this function but I get nothing:

$topMSG = "Print Date\ \: $ENV{DATE}
\n";

What am I doibg wrong?

Thanks.

Quote Reply
Re: Print Date In reply to
How about date and time ?

$date = scalar localtime;
print $date;

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: Print Date In reply to
Just great :-)

And just the date only?

Quote Reply
Re: Print Date In reply to
Try.....


$date = `/bin/date`;

print "The current date is $date";


Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: Print Date In reply to
Done.

Thanks!

Quote Reply
Re: Print Date In reply to
My pleasure....

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/