RE: negative to positive

2002-03-11 Thread Timothy Johnson
Well, your question may not be the answer you want, really. If you just want to change a number from a negative to a positive(and vice versa), you can multiply your number by -1. I suspect, however, that what you really want is a way to return the absolute value of your variable. To do

RE: negative to positive

2002-03-11 Thread Wagner-David
use abs($value) to absolute value Wags ;) -Original Message- From: Stuart Clark [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 19:03 To: perllist Subject: negative to positive Hi all How do i change a negative value to a positive? EG $number1 = -100; $number2 = 50;