Ach Mist doch zu früh gefreut, kriege es irgendwie nicht hin.
Er eschreibt mir immer noch den kompletten Satz in meine XML Datei.Kann mir nochmal jemand helfen ?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!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;