Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
good chemistry is complicated,
and a little bit messy -LW
 
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 cooling their heels in the Monastery: (7)
As of 2014-04-20 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls