Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: pure perl tail revisited

by zentara (Archbishop)
on Sep 10, 2002 at 15:05 UTC ( #196699=note: print w/replies, xml ) Need Help??


in reply to pure perl tail revisited

Hi, I updated my code with a fix for small files. It works pretty well now.
if($chunk >= $filesize){$chunk = $filesize}
and
if($numlines >= $#tailtemp +1){$numlines = $#tailtemp +1}
It took about 10% off my benchmark speed, but is still relatively fast.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2020-04-07 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (42 votes). Check out past polls.

    Notices?