in reply to Re: Re: Fetching date
in thread Fetching date

Anonymous Monk,
You could just make the \d greedy and say \d+ but that runs the risk of mistaken garbage for treasure.
my ($mon, $day, $hour, $min) = $date =~ /(\w+)\s(\d\d?)\s(\d\d):(\d\d) +/;
The above should be closer to what you want, but you should keep some things in mind. If you know that the month abbreviation will always be 3 letters long then say so. When the day is 1 instead of 12 does the number of spaces between the hour change in order to get the fields to line up (perhaps in a log)?
my ($mon, $day, $hour, $min) = $date =~ /(\w{3})\s+(\d\d?)\s+(\d\d):(\ +d\d)/;
Cheers - L~R