Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Looking for a string from a huge log file

by kennethk (Monsignor)
on Sep 13, 2012 at 18:07 UTC ( #993550=note: print w/ replies, xml ) Need Help??


in reply to Looking for a string from a huge log file

Your example leaves a little to be desired -- in order for monks to be able diagnose your issue, we need to be able to replicate it. This means providing some sample input and expected output in addition to code that displays this issue. See How do I post a question effectively?.

The problem you are describing is frequently caused by a variable that gets set in a loop, and then not cleared before it goes into another instance of that loop; this type of issue can usually be addressed with tight scoping of variables combined with the strict pragma. If I assume the code you posted occurs in a loop over a number of files, I'd expect including something like undef $message_1; at the end of your code might resolve your issue. But this is all conjecture without an effective problem statement.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: Looking for a string from a huge log file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-09-19 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (145 votes), past polls