#!/usr/bin/perl use MIME::Parser; use strict; use warnings; my $txtfile ='1.eml'; my $parser = MIME::Parser->new(); open(INPUTSTREAM,"<", $txtfile) or die $!; my $entity = $parser->read(\*INPUTSTREAM) or die $!; $parser->output_to_core(); my $pfad= '/tmp'; $parser->output_dir($pfad); $parser->output_prefix("msg1"); #$entity->print_header(\*STDOUT) or die $!; #$entity->print_body(\*STDOUT) or die $!;