Hi All,

OK, I'm REALLY new to Perl, and programming in general (I know, *sigh*) but
I have what should be a pretty simple question.

I'm trying to make a logon feature for a site that would compare 2 dates,
one in a MySQL database of when a user has registered with a service and the
present date when a user logs on.  The dates are in the yyyy-mm-dd format,
and I know how to use something like split(/-/, $datestring) to reformat
them if necessary, but:

1. How do I get the present date from the server (it's a LINUX server)?  All
I know is something like:

    my $presesntdate = (localtime);

but that gives me the date in the eg. (Fri Jun 8 15:08:25 2001) format,
which doesn't give me a numerical month. I know this must be something quite
simple.

2. How do I compare the date values, so that I can get a numerical value of
days since the user first registered?

Thanks a bunch,
Brian

Reply via email to