on Fri, 19 Jul 2002 11:39:21 GMT, Matt Wetherill wrote:
> Now I know that the perl function localtime returns a date formatted
> like:
>
> Fri Jul 19 12:20:26 2002
>
> So I'm nearly there - all I need to do is remove the 'day of the
> week' from the start of the string (e.g. Fri ) and the time from the
> end (e.g. 12:20:26 2002).
>
> I guess that a regular expression could do all this, but I'm
> struggling - any ideas would be greatly appreciated.
You don't need a regular expression, you can use:
my $d = join " ", (split /\s+/, localtime)[1,2];
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]