in reply to Re^2: Parsing output with a special format
in thread Parsing output with a special format

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.