Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
'perldoc -q tail' might help you, if no perldoc installed here is from perlfaq5
How do I do a "tail -f" in perl? First try seek(GWFILE, 0, 1); The statement "seek(GWFILE, 0, 1)" doesn't change the current p +osition, but it does clear the end-of- file condition on the handle, so that the next <GWFILE> makes P +erl try again to read something. If that doesn't work (it relies on features of your stdio imple +mentation), then you need something more like this: for (;;) { for ($curpos = tell(GWFILE); <GWFILE>; $curpos = tell +(GWFILE)) { # search for some stuff and put it into files } # sleep for a while seek(GWFILE, $curpos, 0); # seek to where we had bee +n } If this still doesn't work, look into the POSIX module. POSIX +defines the clearerr() method, which can remove the end of file condition on a filehandle. The meth +od: read until end of file, clearerr(), read some more. Lather, rinse, repeat. There's also a File::Tail module from CPAN.

but the data transfer over NFS will not be live, there would be minimal delay if you expect live data.

In reply to Re: How do I tail -f a file if it is NFS mounted? by targetsmart
in thread How do I tail -f a file if it is NFS mounted? by smart_amorist

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found