in reply to Prepending characters to lines in file
perl -i.bak -pe 's/$_/> $_/' filename [download]
You don't really need to match the line itself; just matching the beginning of the line works fine: perl -pi.bak -e 's/^/> /' filename