diff options
Diffstat (limited to 'script/public-inbox-learn')
-rw-r--r-- | script/public-inbox-learn | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/public-inbox-learn b/script/public-inbox-learn index 0d6c989b..4c10b68b 100644 --- a/script/public-inbox-learn +++ b/script/public-inbox-learn @@ -20,9 +20,9 @@ if ($train !~ /\A(?:ham|spam|rm)\z/) { my $spamc = PublicInbox::Spamcheck::Spamc->new; my $pi_config = PublicInbox::Config->new; my $err; -my $mime = PublicInbox::MIME->new(eval { +my $mime = PublicInbox::MIME->new(do{ local $/; - my $data = scalar <STDIN>; + my $data = <STDIN>; $data =~ s/\A[\r\n]*From [^\r\n]*\r?\n//s; if ($train ne 'rm') { @@ -36,7 +36,7 @@ my $mime = PublicInbox::MIME->new(eval { }; $err = $@; } - $data + \$data }); sub remove_or_add ($$$$) { |