Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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
Replies are listed 'Best First'.
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 "$_"; }
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

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 having an uproarious good time at the Monastery: (16)
As of 2015-07-07 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls