Hi -

It's not really a variable, its a function,

in scalar context:

$now = localtime ();  <parens are _usually_ optional>
-or, sometimes you must be more explicit-
$now = scalar localtime ();

It returns a formatted string, like;

Thu Oct 17 05:34:07 2002

In list context, it returns a list of values in
a specific order:

@now = localtime ();

$now[0] = seconds
$now[1] = minutes
etc. (see perldoc -f localtime for details)

You may often see the list context use written:

($sec, $min, $hour, ... etc ...) = localtime ();

These are _your_ variables, you could just as easily
say:

($cathy, $tomoko, $grace, ... etc ...) = localtime ();

(to really confuse the guy who has to finish your project)

Aloha => Beau.

-----Original Message-----
From: Joseph Ruffino [mailto:jruffino@;nsls.info]
Sent: Thursday, October 17, 2002 4:32 AM
To: '[EMAIL PROTECTED]'
Subject: Local Time


Hi,

I have a real quick question, I hope.  Now, I know there is a variable 
called localtime, which has the current time and date in, all you have 
to do is assign it to the correct variable.  My question is,  what are 
the correct variable names for  the time?  My assumption is $hour and 
$minute(s), can someone confirm this with me, so I know for sure.

Thank You,

Joe Ruffino
Automated Systems Assistant
[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to