Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Question:

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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

Use split() to get rid of it.

Replies are listed 'Best First'.
Re: Re: Question:
by Anonymous Monk on Jun 25, 2002 at 14: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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://151520]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.