From: Sven Schöling Date: Thu, 22 Mar 2007 14:23:52 +0000 (+0000) Subject: kleine codeverbesserungen X-Git-Tag: release-2.4.3^2~588 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d0810c4289d895acfb8cf477125c6796c51945e3;p=kivitendo-erp.git kleine codeverbesserungen --- diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index c51596dbb..85efc5c37 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -124,13 +124,16 @@ sub section_menu { # than 20 chars and store it in an array. # use this array later instead of the  -ed label @chunks = (); - my ($i,$l) =(-1, 20); + my ($i,$l) = (-1, 20); map { - $l += length $_; - if ($l < 20) { $chunks[$i] .= " $_"; - } else { $l =length $_; $chunks[++$i] = $_; } + if (($l += length $_) < 20) { + $chunks[$i] .= " $_"; + } else { + $l = length $_; + $chunks[++$i] = $_; + } } split / /, $label; - map { $chunks[$_] =~ s/ / / } 0..$#chunks; + map { s/ / / } @chunks; # end multi line $label =~ s/ / /g;