in reply to printf function alternative? formatting without printing
You might have to save the output and "push" those values into array instead of printing the value.
Sample Code :
<code>for ( condition ) {
$n -= ($n * $u) * $u;
push(@i,"$n");
}<code>