use strict; use warnings; my $one_third = 1/3; printf( "Result: %2d%%\n", $one_third * 100 ); my $one_thirtieth = 1/30; printf( "Result: %2d%%\n", $one_thirtieth * 100 );
In reply to Re: sprintf percent formatting
by derby
in thread sprintf percent formatting
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |