Keith Calvert Ivey wrote:
>
> $Bill Luebkert <[EMAIL PROTECTED]> wrote:
> > 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;
>
> I think he needs something more like
>
> my $pct = sprintf "%.2f %%", $d * 100 / $sum;
> $pct =~ tr/./,/; # change period to comma
> print $pct;
If he can't figure out how to change a . to a , maybe he needs a new
occupation/language. :)
--
,-/- __ _ _ $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