Perl and PHP do this with backticks. For example,
$output = `ls`;
Returns a directory listing. A similar function, system(\"foo\")
system(\"foo\")
Ruby: either backticks or the '%x' builtin syntax.
puts `ls`; puts %x{ls};