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 ...
Store each line read in reverse order by doing an unshift rather than a push onto the @logcontent array then there will be no need for the reverse.
Cheers,
JohnGG
In reply to Re^2: How to read the last updated lines from a log file
by johngg
in thread How to read the last updated lines from a log file
by perladdict
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |