Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How do I copy out the last line written in a file?

by I0 (Priest)
on Nov 17, 2004 at 00:38 UTC ( #408296=note: print w/replies, xml ) Need Help??


in reply to How do I copy out the last line written in a file?

use Tie::File:
use Tie::File; sub last_line_of_file { my $file = shift; tie my @array, 'Tie::File', $file or die "read $file - $!"; $array[-1] }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2022-12-05 22:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?