Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Perl >> Snippet

Delete last line of a file


open (FH, "+< $file" );
while ( < FH > ) { $addr = tell (FH) unless eof (FH) }
truncate (FH, $addr );