in reply to Re: Prepending characters to lines in filein thread Prepending characters to lines in file
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