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 };In reply to Re^2: Retrieve "ps -ef" strings using regex
by linuxer
in thread Retrieve "ps -ef" strings using regex
by Raoul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |