in reply to multi-line in-place edits
perl -pi -e 'BEGIN{undef$/};s/(.*)/<$1>/s' filename.txt
A couple of notes:
And... I guess that's it... I undefined $/ so that the file would be read all at once :-)
HTH