case field when "" ARGV.each { |f| File::open(f).each_line { |l| if regexp =~ NKF::nkf('-e', l) then puts f break end } } when "body" ARGV.each { |f| in_body_p = false File::open(f).each_line { |l| if ! in_body_p then in_body_p = true if header_end =~ l elsif regexp =~ NKF::nkf('-e', l) then puts f break end } } =つづく=
when "head" ARGV.each { |f| File::open(f).each_line { |l| break if header_end =~ l if regexp =~ NKF::nkf('-e', l) then puts f break end } } else ARGV.each { |f| in_field_p = false field_value = "" File::open(f).each_line { |l| if ! in_field_p then break if header_end =~ l if field_regexp =~ l then in_field_p = true field_value.concat(Regexp.last_match.post_match.chomp) end else if field_continue =~ l then field_value.concat(Regexp.last_match.post_match.chomp) else if regexp =~ NKF::nkf('-e', field_value) p NKF::nkf('-e', field_value) puts f break else field_value = "" in_field_p = false redo end end end } } end
>>395-396 ありがとうございました。 libmime-base64-perlを入れてsummaryで . y でできました。
それから以前受け取って開けなかった添付ファイルでも . y したけど うまくいかなかったので *Messages* を見たら MIME decoding error: No last boundary for Multipart/Mixed Too large, truncated (the 'T' mark). To get the entire message, type 'I' と書いてあったので I で取り込んで . y で片付きました。