The code has a syntax error: (the ')' on the utime-line)
no need to label the loop, but that's not a big problem though
The style of the script could be better
\d\d\d\d can be written as \d{4} which is lots shorter
Using grep to select ALL elements matching a regex from the file, only using the first one that matches, and then the same regex again on it... perhaps a for/while loop would be better?
Reading the file in memory is not something I would do... I would probably put the date-regex in the main-while loop... (while (<F>))