in reply to Perl Regex with Extra Spaces

Your executable appears to output UTF-16le. Decode it. A convenient way for files:

# With LF<->CRLF conversion open(my $fh, '<:raw:perlio:encoding(UTF-16le):crlf', $fn)

or

# Without LF<->CRLF conversion open(my $fh, '<:raw:perlio:encoding(UTF-16le)', $fn)