Thread Mailversand mittels Perl -Zeilenumbruch (13 answers)
Opened by Gast at 2006-03-09 10:44

kirtas
 2006-03-09 10:56
#63637 #63637
User since
2006-03-09
1 Artikel
BenutzerIn
[default_avatar]
Hallo
Danke erstmals, wrappen tu ich wie folgt:
Code: (dl )
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
sub wrap {

# FUNKTIONSPARAMETER
##
## Text zum Wrappen
my $txt = $_[0];


# WRAPPING
##
my @w_lines = ();

if(length($txt) > $wrap_at) {

for($i = 0; $i < length($txt); $i += $wrap_at) {

push @w_lines, substr($txt, $i, $wrap_at);

}

}

$txt = "";

$txt = join "\n", @w_lines;

}


Thx\n\n

<!--EDIT|renee|1142263056-->

View full thread Mailversand mittels Perl -Zeilenumbruch