See also perldoc -q "insert a line" (or search for the same in perldoc perlfaq5).
In reply to Re: insert line of text above a line by Fletch in thread insert line of text above a line by mabman