From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jonathan Dudson
Sent: 07 February 2006 02:24
To: [email protected]
Subject: Breaking Up A Date.

> I am pretty much a newbie when it comes to perl.
> 
>  
> 
> I am trying to break up either localtime or time so they I end up with
three separate variables $date (06)
> $month(02)  $year(2006)  that I can use in an archiving script.
> 
> Someone suggested using date calc but that appears to work with values
passed to it that you may already have.
> 
>  
> 
> Any suggestions would be great.

You should investigate Date::Calc a bit harder then (I know there are a
lot of functions) as it has a number of functions that can return
exactly what you ask for (Today, Now, Localtime, Gmtime).

It depends on what you want to do with the variables next. If you want
to perform any calculations or comparisons, then Date::Calc is a good
way to go, otherwise $Bill's suggestion is a good one. However, if all
you want to do is use the date to create a formatted a string (e.g.
using [s]printf), then I suggest looking at POSIX::strftime.

HTH

-- 
Brian Raven



=================================
Atos Euronext Market Solutions Disclaimer
=================================
The information contained in this e-mail is confidential and solely for the 
intended addressee(s). Unauthorised reproduction, disclosure, modification, 
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message do not 
necessarily reflect those of Atos Euronext Market Solutions.

L'information contenue dans cet e-mail est confidentielle et uniquement 
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. 
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail 
vous parvient par erreur, nous vous prions de bien vouloir prevenir 
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre 
systeme. Le contenu de ce message electronique ne represente pas necessairement 
la position ou le point de vue d'Atos Euronext Market Solutions.


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to