123456789101112131415161718192021222324252627
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; }