Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Question:

by Anonymous Monk
on Jun 25, 2002 at 18:23 UTC ( #177165=note: print w/ replies, xml ) Need Help??


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

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://177165]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2016-06-28 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (359 votes). Check out past polls.