http://qs321.pair.com?node_id=445382


in reply to while loop not exiting?

Is there more code after the loop?

Try adding a $|=1 to the top of your code. Just a hunch.

Otherwise the code looks ok to me.
--------------
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."

Replies are listed 'Best First'.
Re^2: while loop not exiting?
by ikegami (Patriarch) on Apr 06, 2005 at 18:21 UTC
    RazorbladeBidet means the loop may in fact be ending without you realizing it because of buffering. If select(STDOUT); $|=1; helps, it means the problem is actually after the loop, and that you got fooled into thinking it was within the loop because the printed data was still in a buffer.
Re^2: while loop not exiting?
by mabman2 (Novice) on Apr 06, 2005 at 18:55 UTC
    OK, thanks, that works. The next part of the code involves searching my newly created multidimensional array for duplicate entries but in other positions (and it's a fairly large text file to begin with), which takes a while, which is likely what I was experiencing while not seeing the next (apparently buffered) "print" statements.

    I have other questions about efficient searching/matching inside an array, but that's a subject for another thread and I have to go out now :)

    Thanks again!!