in reply to Problem with while loop inside a foreach loop

I'm pretty sure that using named variables instead of $_ in THREE nested loops solves the issue. :)

Maybe you should take some looks into Damian's PBP?

Cheers Rolf

( addicted to the Perl Programming Language)

  • Comment on Re: Problem with while loop inside a foreach loop

Replies are listed 'Best First'.
Re^2: Problem with while loop inside a foreach loop
by andylevel2 (Initiate) on May 03, 2013 at 13:16 UTC
    Thanks all, that does solve the issue. I thought that the population of $_ (following the evaluation of some expresion) was a one way thing. The idea that changing $_ can work its way back to another variable will take a bit more thought on my part. Rolf, I like your diplomacy in suggesting "Perl Best Practices" :) I have just ordered it from the big south American river!
      > I have just ordered it from the big south American river!

      Great ... TheDamian owes me a drink now! ;-)

      Cheers Rolf

      ( addicted to the Perl Programming Language)