Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: while loop not exiting?

by RazorbladeBidet (Friar)
on Apr 06, 2005 at 18:05 UTC ( [id://445382]=note: print w/replies, xml ) Need Help??


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!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://445382]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found