#!/usr/bin/perl -w use MIME::Parser; use strict; use utf8; ########################################### ### Mail parsen ### ########################################### # Create a new MIME parser: my $parser = new MIME::Parser; # Create and set the output directory: $parser->output_dir("/tmp/workdir"); # Read the MIME message: my $entity = $parser->read(\*STDIN) or die "couldn't parse MIME stream";