Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Re: Re: POE, was Re: Tk tail -f - How?

by BrowserUk (Pope)
on Oct 09, 2003 at 18:01 UTC ( #298029=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: POE, was Re: Tk tail -f - How?
in thread Tk tail -f - How?

any ideas anyone?

What my one-liner above demonstrated was that if you read the file with the diamond operator, the way you detect eof, is when it returns undef. If you simply ignore the undefs and continue reading, the eof condition clears itself without any further action required..

Given the docs you cite, I'm not sure if this is "working as designed" or an an undocumented and therefore unreliable feature, but it has worked this way in every version of perl I've used. About the oldest script I have that I still use makes use of this feature.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

  • Comment on Re: Re: Re: Re: POE, was Re: Tk tail -f - How?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2020-10-30 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (279 votes). Check out past polls.

    Notices?