Output:use strict; use warnings; use POSIX qw( ceil ); my $round_to = 100; for( 78345, 5674 ) { print "$_ -> ", ceil( $_/$round_to ) * $round_to, "\n"; }
78345 -> 78400 5674 -> 5700
Take a look at the thread I mentioned in my previous post. There are quite a few examples to help you.
In reply to Re^3: Round up 3 values to the next 100
by bobf
in thread Round up 3 values to the next 100
by siva kumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |