Functionally, it works just fine. However, in the email I receive, the second and all following lines of the analyzer output are indented one space. This indentation does not occur when running the analyzer directly from a shell prompt. There's also a Python version of the wrapper (the code above is actually from a Perl port of the Python code) and the Python version does not produce this indentation either - comparing the mail received from the Python and Perl versions is how I noticed it in the first place.my ($analyze_in, $analyze_out); my $kid_pid = open2($analyze_out, $analyze_in, $ANALYZE_PATH); exit 0 unless $kid_pid; while (my $line = <>) { print $analyze_in $line; } close $analyze_in; my @result = <$analyze_out>; die unless open my $sendmail_fh, '|' . $SENDMAIL_CMD; print $sendmail_fh <<EOM; From: $from_addr To: $from_addr Subject: Re: $subject @result EOM close $sendmail_fh;
Any thoughts on what might be causing this or how to prevent it? (Note that s/^ // is not prevention...)
In reply to Minor formatting oddity with pipes by dsheroh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |