Thank you both very much, Mr. Fowler and Mr. Shevek. The use of a third-party module raises a new problem: there is any way to automate the installation of pre-requisite libraries on a system? I wanna end up with a script that the operator just runs before publishing the new scripts on the production system, and that is able to install all libraries. I have a connection to the internet and think on something like
#!/usr/bin/perl -wT use strict; use CPAN; install qw/ Some::Module And::Another::One Time::Parse DateTime /; __END__ Will this work as I think? Anybody have any suggestions? Thank you all very much for you help! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Luis Campos de Carvalho Computer Scientist OCP DBA Oracle & Senior Unix Sys Admin =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ----- Original Message ----- From: "Mark Fowler" <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 9:06 AM Subject: Re: REGEXP Hell > Shevek wrote: > > > I won't recommend a date module, other people will. Look on CPAN at > > search.cpan.org. Search for Date. > > Or Time. Goodness, I can't wait for DateTime to be sorted out :-). > > Date::Parse is really friendly and will automatically parse most dates the > way you want to without any effort on your part: > > use Date::Parse > my $time = str2time($date); # automatically recognises most formats > > If you want more control over exactly the parsing is done, the kind of > thing that you might use the unix strptime function for, see Time::Piece: > > use Time::Piece; > my $time = Time::Piece->strptime($string, $format); > > Where $format is a standard strptime string (see the strptime man page on > your system) > > There are lots of other modules on CPAN that can also help you. As Shevek > pointed out, There's More Than One Way To Do It. > > Mark.