Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 imbibing at the Monastery: (7)
As of 2014-12-20 20:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (98 votes), past polls