Capture the output of Perl's 'system()'

Viewed 87116

I need to run a shell command with system() in Perl. For example,

system('ls')

The system call will print to STDOUT, but I want to capture the output into a variable so that I can do future processing with my Perl code.

4 Answers
Related