in reply to Re: reducing numbers
in thread reducing numbers

is it possible to use sprintf and print to a file; I have tried the following with no success;
print OUTFILE sprintf("%.3f", $number);
thanks

Replies are listed 'Best First'.
Re: Re: Re: reducing numbers
by Anonymous Monk on Apr 25, 2003 at 13:41 UTC

    Works ok for me, though you would be better off using printf.

    printf( OUTFILE "%3f\n", $number );