in reply to need help:insert a line in a textfile
perl -i.bak -pe 'print "New line here\n" if $. == 1' file [download]
-- John.