On Dec 5, 4:57 pm, Venks <venkatesh.man... / gmail.com> wrote: > What's the best way to capture STDOUT into an Array? I looked at > popen3, open4, systemu but couldn't figure out how to do this. > > In short, I want to execute a system call like "ls -l" and capture it > into an array. Of course, "ls -l" may not have proper delimiter but > assume that the delimiter is TAB or COMMA. lines = `ls -l`.split( /\n/ )