Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 browsing the Monastery: (3)
As of 2014-09-22 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls