From: Phrogz Date: 2007-12-06T09:14:59+09:00 Subject: Re: Capturing STDOUT from a system call (POSIX) into an array On Dec 5, 4:57 pm, Venks 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/ )