my $field = $msg->head->get('Content-Disposition') or return; my $full = $field->study; # full understanding in unicode my $filename = $full->attribute('filename') or return; print ref $filename; # this class name print $filename; # the attributes content in utf-8 print $filename->value; # same print $filename->string; # print string as was found in the file $filename->print(\*OUT); # print as was found in the file
See SYNOPSIS in Mail::Reporter
Attributes within MIME fields can be quite complex, and therefore be slow and consumes a lot of memory. The Mail::Message::Field::Fast and Mail::Message::Field::Flex simplify them the attributes a lot, which may result in erroneous behavior in rare cases. With the increase of non-western languages on Internet, the need for the complex headers becomes more and more in demand.
A Mail::Message::Field::Attribute
can be found in any structured
Mail::Message::Field::Full header field.
See DESCRIPTION in Mail::Reporter