#!C:\Perl\bin\Perl.exe use Net::POP3; # Constructors $pop = Net::POP3->new('mail.gmx.de'); $pop = Net::POP3->new('mail.gmx.de', Timeout => 60); $username='xxxxx@gmx.de'; $password='xxxxx'; if ($pop->login($username, $password) > 0) { my $msgnums = $pop->list; # hashref of msgnum => size foreach my $msgnum (keys %$msgnums) { sleep 2; $zeitstempel=time(); flock (IMPORTER, 2); my $msg = $pop->get($msgnum); open(IMPORTER,">F:/CALL_IMPORTER/$zeitstempel.xml"); $msg =~ s/^.*?\n\n//s; print IMPORTER @$msg; #print localtime(); print $zeitstempel; #$pop->delete($msgnum); close IMPORTER; } } $pop->quit; sleep 5; $filemover=system("F:/move.bat"); print $filemover;