- or download this
use strict;
use warnings;
...
untie @lines;
- or download this
$ perl test.pl test.file
File has 4 lines
...
File has 2 lines
replacement line here
another new line
- or download this
$ cat test.file
replacement line here
another new line
$