in reply to Adding <pre> at beginning </pre> at file end
perl -pe 'BEGIN {print "<pre>"} END {print "</pre>"}' file.old > file. +new [download]