This is a FAQ.
use Tie::File; tie my @lines, 'Tie::File', 'myfile.txt' or die 'tie failed'; unshift @lines, "a new line\n"; untie @lines;
the lowliest monk
In reply to Re: adding a line to the beginning of a file
by tlm
in thread adding a line to the beginning of a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |