in reply to Re^4: How to capture error messages... (shell quoting recipe)
in thread How to capture error messages...

If you really need to quote strings for a bash-like shell, try one of these (untested)
Or you could use a module, like String::ShellQuote, that most likely has been tested.
  • Comment on Re^5: How to capture error messages... (shell quoting recipe)