Leser: 3
|< 1 2 >| | 14 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
use MIME::Explode;
my $explode = MIME::Explode->new(
output_dir => "tmp",
mkdir => 0755,
decode_subject => 1,
check_content_type => 1,
content_types => ["image/gif", "image/jpeg", "image/bmp"],
types_action => "exclude"
);
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
#!/usr/bin/perl -w
use strict;
use warnings;
my $path = "/Ordner/wo/alles/liegt";
my $file = "datei_mit_der_mail";
my $gefunden = 0;
open(DATA, "<$path/$file") || die "Cannot open $file file!\n";
while (<DATA>)
{
chomp;
$zeile = $_;
if ( /^test1;test2;test3/ )
{
$gefunden = 1;
}
if ( $gefunden == 1 )
{
if ( $zeile =~ s/\=// )
{
print "Debug: $zeile\n";
}
}
}
close (DATA);
if ( $zeile =~ s/\=\r// )
if ( $zeile =~ s/\=\n// )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl
use strict;
use warnings;
for (<DATA>) {
$_ =~ s/=\n//;
print;
}
__DATA__
test1;test2;test3;test4;test=
5;test6
1;2;3;4;5=
;6
1
2
3
G:\programmierung\perl\community>perl cvs-mail.txt
test1;test2;test3;test4;test5;test6
1;2;3;4;5;6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
my $gefunden = 0;
open(DATA, "<$path/$file") || die "Cannot open file!\n";
while (<DATA>)
{
$zeile = $_;
if ( /^Belegnummer;Position;Materialnr.;/ )
{
$gefunden = 1;
}
if ( $gefunden == 1 )
{
$zeile =~ s/=\n//;
print "Debug: $zeile\n";
}
}
close (DATA);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
open(DATA, "<$path/$file") || die "Cannot open file!\n";
for (<DATA>)
{
$zeile = $_;
if ( /^Belegnummer;Position;Materialnr.;/ )
{
$gefunden = 1;
}
if ( $gefunden == 1 )
{
$zeile =~ s/=\n//;
print $zeile;
}
}
close (DATA);
|< 1 2 >| | 14 Einträge, 2 Seiten |