Thanks --- JeeBee <[EMAIL PROTECTED]> wrote:
> > Just do $result = $var1 + $var2; > int returns the integer part of a number, > see: perldoc -f int > > JeeBee > > On Tue, 14 Feb 2006 07:04:18 -0800, Ravi Malghan > wrote: > > > Hi: I think this is very trivial, but just can't > seem to figure it out. I > > have two strings $var1 = "0.12" and $var2 = "0.3". > I want to add these two > > and have 0.42 in $result, but $result = int($var1) > + int($var2) always > > results to 0? > > > > What am I doing wrong. > > Thanks > > Ray > > > > > > > > __________________________________________________ > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > -- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > <http://learn.perl.org/> > <http://learn.perl.org/first-response> > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>