# Scale the box and colon circles by a scale factor
sub scale {
my($bx, $tc, $bc) = @_;
$selw = $baseelw * $scale; # Scale the eleme
+nt width
$bx = [map {$_ * $scale} @baseBox]; # Scale elements
$tc = [map {$_ * $scale} @baseTopColon];
$bc = [map {$_ * $scale} @baseBotColon];
foreach my $i(0 .. $#$bx) { # Return scaled e
+lements
$_[0][$i] = @$bx[$i]; # via referenc
+es
}
foreach my $i(0 .. $#$tc) {
$_[1][$i] = @$tc[$i];
}
foreach my $i(0 .. $#$bc) {
$_[2][$i] = @$bc[$i];
}
$scale = $scale + 1; # Bump for next c
+ycle
return;
}
That could be written more simply as:
# Scale the box and colon circles by a scale factor
sub scale {
my($bx, $tc, $bc) = @_;
$selw = $baseelw * $scale; # Scale the eleme
+nt width
@$bx = map {$_ * $scale} @baseBox; # Scale elements
@$tc = map {$_ * $scale} @baseTopColon;
@$bc = map {$_ * $scale} @baseBotColon;
++$scale; # Bump for next cycle
return;
}
Naked blocks are fun!
-- Randal L. Schwartz, Perl hacker