in reply to Problem with MIME::Parser and filenames

I'm not sure if relevant, but from a quick look at the docs for MIME::Parser it says you should not use decode_headers() unless you really know what you are doing. Have you tried commenting out that line?

Replies are listed 'Best First'.
Re^2: Problem with MIME::Parser and filenames
by Laurielounge (Acolyte) on Oct 10, 2017 at 23:12 UTC
    Good idea. Didn't help though... exactly the same outcome.
      FWIW I sent myself a xlsx file with the same name as yours. It came in with the same Content-Type (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) and MIME::Parser saved the attached file correctly. So I don't think Content-Type is the problem. Could it be some type of filename length restriction - try adding something like this to your script:
      system('getconf NAME_MAX ' . $tmpdir);