I have file with sth like that:
Mon Aug 1 08:07:21 -0700 2005
Tue Aug 2 09:11:32 -0700 2005
I need only the month, day, hour and year values to sort them later, which is absolutely another question/thread
So the first think which comes to my mind is to
split them into array and pass the needed values in another array, but it is too stupid I think. Then I tried this:
while (<IN>) {
($arr[$i][1], $arr[$i][2], $arr[$i][3], $arr[$i][4]) =
/^\w{3}\s(\w{3})\s(\d{2})\s(\d{2}\:\d{2}\:\d{2})\s[\-\s\d{4}]\s(\d{4})/;
}
but it's obviouslly wrong.
Do you have any ideas?
Corwin
Mon Aug 1 08:07:21 -0700 2005
Tue Aug 2 09:11:32 -0700 2005
I need only the month, day, hour and year values to sort them later, which is absolutely another question/thread
So the first think which comes to my mind is to
split them into array and pass the needed values in another array, but it is too stupid I think. Then I tried this:
while (<IN>) {
($arr[$i][1], $arr[$i][2], $arr[$i][3], $arr[$i][4]) =
/^\w{3}\s(\w{3})\s(\d{2})\s(\d{2}\:\d{2}\:\d{2})\s[\-\s\d{4}]\s(\d{4})/;
}
but it's obviouslly wrong.
Do you have any ideas?
Corwin