3.2.156 sprintfsprintf This function returns a string formatted by the usual printf
conventions. The %where the
The various combinations are fully documented in the manpage for
printf(3), but we'll mention that
$width = 20; $value = sin 1.0;
foreach $precision (0..($width-2)) {
$output_arr[$precision] = sprintf "%${width}.${precision}f", $value;
} |