in reply to Storing system results in an array
perldoc perlop, look for backticks (``; aka qx//).
Update: Alternately just open a pipe and read from that (which would also eliminate the need for an external grep).