fraizerangus has asked for the wisdom of the Perl Monks concerning the following question:
iterating through to get a result I want, but I want to save this result in an index of an array, but the above function just prints it to the screen I can't do anything with it?! to save the result and process it further is there anyway I can format it and save it as a string, in a for loop? e.g.$n -= ($n * $u) * $u; printf "%d\n", abs($n);
many thanks and apologies if this question seems or sounds stupid to you?array [$i] = (printf "%d\n", abs($n));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: printf function alternative? formatting without printing
by SankoR (Prior) on Jan 09, 2010 at 15:34 UTC | |
|
Re: printf function alternative? formatting without printing
by FunkyMonk (Bishop) on Jan 09, 2010 at 16:16 UTC | |
|
Re: printf function alternative? formatting without printing
by ww (Archbishop) on Jan 09, 2010 at 18:41 UTC | |
|
Re: printf function alternative? formatting without printing
by toolic (Bishop) on Jan 09, 2010 at 18:43 UTC | |
|
Re: printf function alternative? formatting without printing
by ikegami (Patriarch) on Jan 09, 2010 at 19:04 UTC | |
|
Re: printf function alternative? formatting without printing
by ravi.s (Initiate) on Jan 09, 2010 at 21:19 UTC | |
|
Re: printf function alternative? formatting without printing
by mnooning (Beadle) on Jan 09, 2010 at 18:55 UTC |