in reply to How do I add a few stings of text, 30 lines before the EOF?
use strict; open FILE, "fichero.txt"; my @lines = <FILE>; close FILE; my @newlines = ("First\n", "Second\n"); splice @lines,-30,0,@newlines; print @lines;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I add a few stings of text, 30 lines before the EOF?
by lucasdmc (Initiate) on Oct 16, 2001 at 03:31 UTC |