my $test_output = system($cmd);
That won't work, since system returns the exit code and does not capture the command's output. I would recommend capture or capturex from IPC::System::Simple, which can give you an array of lines (my @lines = capture($cmd);). Otherwise, e.g. if the command's output is too large to be captured all at once, you could use a piped open, as I showed here along with other possible solutions.
In reply to Re^3: Parsing output with a special format
by haukex
in thread Parsing output with a special format
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |