If you need to do something more sophisticated as part of a program you should try something like this.
#!/usr/bin/perl -w use strict; # Localised in-place edit { local $^I = ''; # or use '.bak' to save a back-up local @ARGV = 'somefile'; while (<>) { print unless eof; } } __END__
--
John.
In reply to Re: Re: Re: Deleting last line of file
by jmcnamara
in thread Deleting last line of file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |