Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Question:

by Anonymous Monk
on Mar 13, 2002 at 20:50 UTC ( #151520=note: print w/ replies, xml ) Need Help??


in reply to Question:
in thread Using (s)printf()

Use split() to get rid of it.


Comment on Re: Question:
Re: Re: Question:
by Anonymous Monk on Jun 25, 2002 at 18:23 UTC
    sub _round {
    my $digits = shift;
    my $num = shift;

    my $add = 5 * (10 ** -($digits + 1));

    $num += $add;

    my ($int,$frac) = split /\./,$num;

    $frac = substr($frac, 0, $digits);

    $num = join '.', $int, $frac;

    return $num;
    }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://151520]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-12-27 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls