Kristofer Wolff wrote:
> 
> hi I am priniting out procents like:
> 
>                                 $procent = ($d*100)/$sum;
>                                 print "$procent %";
> 
> but now i have somthing like: "13,832548 %" how can I round this to a 2
> string thing after the komma ?

It's 'percent' in English.  :)

printf "%.2f %%", $d * 100 / $sum;

-- 
  ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
 (_/   /  )    // //       DBE Collectibles   http://www.todbe.com/
  / ) /--<  o // //      Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
-/-' /___/_<_</_</_    http://www.freeyellow.com/members/dbecoll/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to