Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2017-02-19 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (293 votes). Check out past polls.