1. ``
The Backtick
- defined in Kernel
1. a) %x{}
Percent X < alternate syntax for The Backtick
- defined in parse.y, see discussion
2. system()
3. fork()
4. open()
- open a pipe
- Kernel#open
4.a. IO.popen()
< behaves the same as open()
- open a pipe
- IO#popen
4.b. open("|-")
- fork to a pipe
4.c. IO.popen("-")
< behaves the same as open("|-")
- fork to a pipe
- see discussion
5. Open3.popen3()
require 'open3'
- stdlib Open3
6. PTY.spawn()
require 'pty'
- stdlib PTY
7. Shell.transact()
require 'shell'
- stdlib Shell
When should one forsake the trusty back-tick for one of the more complex methods?
Edit 1. Big thanks to Avdi Grimm for his posts describing example usage of each method: #1 (& gist); #2 (& gist); #3.
They are fantastic resources to answer How, but are not explicitly composed to answer when each should be used or Why, and as such IMHO are not complete answers to this question.