Hi aki,
A couple of points, you should use <code> </code> tags around code and data also if you want to post a job spec there are several sites where you can pay people to code it for you.
If however you want to learn Perl try coding up the following and then come back to us with problems you are having, this way you learn and we get a warm happy smug feeling, a win win :)
- open your file
- while there are lines in the file:
- if the current line starts with COM, has some characters and a space followed by some digits at the end of the line, capture those digits. Take a read through The regular expression documentation paying particular attention to beginning of line and end of line anchors, capturing part of an expression and character classes.
- push the captured digits onto the array in question
- Do whatever with your array
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."