use File::Tail; $file=File::Tail->new("/tmp/xxx"); print "opened\n"; $line=$file->read; print "after read\n"; print "$line";