Stuart Clark wrote: > > Hi, Hello,
> How do I distinguish between positive and negative values.
$ perl -e'
for $value ( -15.32, 243.56, -2.45 ) {
if ( abs $value == $value ) {
print "$value has a positive value.\n";
}
else {
print "$value has a negative value.\n";
}
}
'
-15.32 has a negative value.
243.56 has a positive value.
-2.45 has a negative value.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
