Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

following a file with Perl

by perlcapt (Pilgrim)
on Jun 18, 2006 at 15:46 UTC ( #556110=perlquestion: print w/ replies, xml ) Need Help??
perlcapt has asked for the wisdom of the Perl Monks concerning the following question:

How does tail -f, the follow mode to tail, work its magic? Is there any way to open a file similarly in Perl?
perlcapt
-ben

Comment on following a file with Perl
Download Code
Re: following a file with Perl
by reneeb (Chaplain) on Jun 18, 2006 at 15:49 UTC
Re: following a file with Perl
by McDarren (Abbot) on Jun 18, 2006 at 15:50 UTC
    How does tail -f, the follow mode to tail, work its magic?
    man tail
    Is there any way to open a file similarly in Perl?
    Yes, File::Tail
Re: following a file with Perl
by sgifford (Prior) on Jun 18, 2006 at 16:15 UTC
Re: following a file with Perl
by liverpole (Monsignor) on Jun 18, 2006 at 18:04 UTC
    Hi perlcapt,

    A similar question was asked 5 days, ago (and got similar responses).  In particular, I'd recommend looking at my response if you're interested in the specifics of how you might write your own subroutine to mimic tail -f.


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-11-24 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (137 votes), past polls