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
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;