Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Looking for a string from a huge log file

by kennethk (Abbot)
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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://993550]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2017-04-23 09:26 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (430 votes). Check out past polls.