in reply to Re^4: Split a variable at a Given Line-Number
in thread Split a variable at a Given Line-Number

Granted, but you should care about trailing empty lines.

Cheers Rolf

UPDATE:

for completeness ($pre,$post)=split /((?:\n.*){16}$)/,$txt