Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036029]
help
Chatterbox?
[Corion]: Also, there's one colleague who wants to join a well-established weekly telco, and I'm not convinced of the use there...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-03-29 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (344 votes). Check out past polls.