in reply to line ends,, backticks and perl security

No. Performing arbitrary transformations on your input serves no purpose but to mangle the data.

If you think the input was wrong (unintentionally) but salvageable, parse it and reconstruct a clean version. If the input is completely invalid, reject it with an error message. If your script can't be expected to fully validate the input, reject obvious errors and accept the rest unmodified. Don't worry about metacharacters unless you're sure they can't occur in a valid input.

Regardless of what you do on input, always always ALWAYS encode your output so that whatever you're passing it to will receive it perfectly intact. Whenever possible, use interfaces that don't require encoding (e.g. the multi-argument forms of system and exec, the four-argument form of piped open, and replaced values in DBI). The only unsafe data is data that is improperly handled.