At 08:42 PM 9/10/2001 -0400, [EMAIL PROTECTED] wrote:
>Hello,
>Can some one please suggest me a pointer to do easy date manipulations in 
>perl.
>I have dates as strigs I need to compare 2 dates and may
>be sort an array of dates(Strings).
>
>Thanks
>s-

Look at the Date modules on CPAN. I quite like one of the recent ones 
called Class::Date but you'll find that it isn't in ActiveState's PPM 
repository yet and requires a C compiler to compile if you are using 
Windows NT.  Otherwise consider looking at Date::Manip and Date::Calc.

Also, questions like this beg for you to buy the Perl Cookbook from 
O'Reilly. It has all sorts of quick recipes for Perl for doing operations 
like this.

In addition, you might find some operations are quite trivial. eg if you 
have a string and you know how to parse it into date parts, you could put 
the date parts together again in a way that will compare easily in a sort. 
eg yyyymmdd will sort fairly accurately in scalar context.



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

Reply via email to