From d0810c4289d895acfb8cf477125c6796c51945e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 22 Mar 2007 14:23:52 +0000 Subject: [PATCH] kleine codeverbesserungen --- bin/mozilla/menu.pl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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; -- 2.20.1