in reply to help with sprintf

What about...
my $number = $base * (10**$power); $hto_visk0 = sprintf("%.${power}f", $hto_visk0);


Unless I state otherwise, all my code runs with strict and warnings

Replies are listed 'Best First'.
Re^2: help with sprintf
by lil_v (Sexton) on Jun 26, 2008 at 18:39 UTC
    I tried that before and it doesnt seem to work... hence the confusion...:(
      Can you give some examples of the output you expect to see from a range of different inputs?

      Unless I state otherwise, all my code runs with strict and warnings
        example: Input: (user selects)
        2 e -10 (No. between 0-9) e (No. between 10 and -20)
        I want the output to be 0.0000000002 instead of 2e-10 I hope this helps...