Dear Monks suggest me how i need to parse the log with only last occurrence of of <START>....</START> log contentHow about just reading the log file backwards (see How do I read a file line by line in reverse order (from EOF to start of file)) and stopping when you hit the first <START> (i.e., the beginning of the last log file)? You could capture the lines (in reverse order) in your @logcontent array and then reverse the order (to the proper order) with @logcontent = reverse @logcontent before calling sendmail( $now, \@logcontent );.
In reply to Re: How to read the last updated lines from a log file
by frozenwithjoy
in thread How to read the last updated lines from a log file
by perladdict
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |