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.

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