From 9b8d2d368876abd5f61bc4d04662685379c6dbc9 Mon Sep 17 00:00:00 2001 From: hpa Date: Tue, 10 Apr 2001 04:13:30 +0000 Subject: [PATCH] Use Perl constructs that are somewhat cleaner. --- lss16toppm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lss16toppm b/lss16toppm index 8a9d59c..1e1bbba 100755 --- a/lss16toppm +++ b/lss16toppm @@ -101,11 +101,8 @@ for ( $y = 0 ; $y < $ysize ; $y++ ) { # Truncate overlong runs $c = $xsize-$x if ( $c > $xsize-$x ); # Output run - while ( $c ) { - print $color{$n}; - $c--; - $x++; - } + print $color{$n} x $c; + $x += $c; } } } -- 2.7.4