Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: How to read the last updated lines from a log file

by johngg (Abbot)
on May 30, 2013 at 11:46 UTC ( #1036029=note: print w/ replies, xml ) Need Help??


in reply to Re: How to read the last updated lines from a log file
in thread How to read the last updated lines from a 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 ...

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


Comment on Re^2: How to read the last updated lines from a log file
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036029]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2014-12-22 19:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (126 votes), past polls