perl -i -p -e "BEGIN{print 'A new line!\n';}" your files here