commit 6115e971d4f4bb842f727c47301269b406666364 from: Caleb Stein date: Wed May 6 22:52:30 2026 UTC remove unnecessary variable commit - 6440ea89c254d02ffd3b020f81b061be397290be commit + 6115e971d4f4bb842f727c47301269b406666364 blob - 95389304453e989ea05e94f88592135419482bd4 blob + 1969819a3b6e71c60782ffa787def82ba9fc4fd7 --- mailread.pl +++ mailread.pl @@ -3,12 +3,10 @@ use strict; use IPC::Run3; -my $content = do { local $/; <> }; -my ($headers, $body) = $content =~ /^(.*?\n)\n(.*)$/s ? ($1, $2) : ('', $content); -my $ishtml = qr/< *(html|head|body|div|table|p|span|br) *\/?>/i; +my ($headers, $body) = do { local $/; <> } =~ /(^(.*?\n)\n(.*)$)/s ? ($2, $3) : ('', $1); +my $ishtml = qr/< *(?:html|head|body|div|table|p|span|br) *\/?>/i; run3(['lynx', '-dump', '-force_html', '-stdin'], \$body, \$body, undef) if ($body =~ $ishtml); - print "$headers\n"; { open my $body_fh, '<', \$body or die $!;