how to get defined number of digits after point of a variable



Hi:
I am a real beginner of perl. after looking for Internet for serveral
hours, I still can't find the answers for my problem. My question is:
Which function I can use to get 2 digits after point for a variable?
For example, for $j=2.56789, how can I get the very first two digits
after points,ie, I just want to get 2.56.
Thank you very much in advance.
.



Relevant Pages

  • Re: how to get defined number of digits after point of a variable
    ... >> I am a real beginner of perl. ... after looking for Internet for serveral ... >> Which function I can use to get 2 digits after point for a variable? ...
    (perl.beginners)
  • Re: how to get defined number of digits after point of a variable
    ... > I am a real beginner of perl. ... after looking for Internet for serveral ... > Which function I can use to get 2 digits after point for a variable? ...
    (perl.beginners)
  • Re: float bug? perl 5.8, DBI and oracle 10.2.0
    ... precision numbers in oracle, you've got 38 decimal digits to play ... and with minimal coaxing perl will handle them as ... digits from a 32 bit floating point number - I'll go out on a limb ... and hazard that one can expect 12 or so digits from a 64 bit floating ...
    (perl.dbi.users)
  • Re: Changing date field in a text file...
    ... > you understand a little more about the Perl language. ... > seeing those quotes anyway. ... Those two digits will be the day number. ... The regular expression is the contents of the first pair ...
    (comp.unix.shell)
  • Re: Changing date field in a text file...
    ... you understand a little more about the Perl language. ... But the shell "eats" quotes before sending the rest to Perl. ... Those two digits will be the day number. ... The regular expression is the contents of the first pair ...
    (comp.unix.shell)