in reply to correct angle on tackling a problem

Add a flag that tells you whether the line has printed or not. Check this flag before printing it next time :)
  • Comment on Re: correct angle on tackling a problem

Replies are listed 'Best First'.
Re^2: correct angle on tackling a problem
by diamondsandperls (Beadle) on Aug 24, 2012 at 18:03 UTC
    I am not sure how to tie this into my current code could you provide an example your help is very much appreciated. I am assuming I regex to the source address assign this variable a scalar value such as $flag. I am not sure how to check whether the source or dst address has already printed. It will be one or the other as well most of the time source

    thanks in advanced

      foo() unless $seen{$key}++;

      --MidLifeXis