in reply to Remove ÿþ from a string
Since the BOM is unicode, you have to use unicode to remove the BOM:
s/\x{feff}//; [download]
But if you use vim, removing the BOM is as simple as loading the file, typing
:set nobomb [download]
and writing the file back to disk.