Govinderjit Dhinsa wrote:
>
> How could I please put the following example;
>
> 1000.000
> 10.0000000
> 100.0000000
> 10000.0000000
> To please print out, IN A LINE with the Decimal Place! and not from the
> first number, so all the decimal places would line up!
> example;
>
> I have tried printf and had no luck
while ( <DATA> ) {
printf "%20.7f\n", $_;
# ^ ^^
# | ||
# | |Floating point format
# | Number of decimal places
# Total length of field
}
__DATA__
1000.000
10.0000000
100.0000000
10000.0000000
Output:
1000.0000000
10.0000000
100.0000000
10000.0000000
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]