in reply to Re: Retrieve "ps -ef" strings using regex
in thread Retrieve "ps -ef" strings using regex

instead of reading the result into a scalar and split it afterwards, you could assign the result of the backticks to an array.

my @lines = qx{ command | grep what };