Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Read log which is being updated continuisly

by nemesdani (Friar)
on Sep 20, 2012 at 09:34 UTC ( #994618=note: print w/ replies, xml ) Need Help??


in reply to Read log which is being updated continuisly

You must tie() your filehandle, thus the <> operator won't return an undef.


I'm too lazy to be proud of being impatient.


Comment on Re: Read log which is being updated continuisly
Select or Download Code
Re^2: Read log which is being updated continuisly
by Anonymous Monk on Sep 20, 2012 at 10:14 UTC
    but OP isn't using the <> operator, op is using the read method, straight from the synopsis
Re^2: Read log which is being updated continuisly
by bimleshsharma (Beadle) on Sep 20, 2012 at 10:30 UTC
    Yes you are right but File::Tail->read has capability to read file. Anyway i tried below but still not success.
    use File::Tail; my $name="/some/file/toread/"; my $ref=tie *FH,"File::Tail",(name=>$name); while (<FH>) { print "$_"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-12-29 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls