in reply to Some simple math and absolute values

Hi,

I think this will do the same:
Update: No, it fails to do the right thing for negative $wt values greater than -1.
$wt = $ARGV[0]; $min = 1; $price = 10; while ($wt ne '') { $wt = $min if abs($wt)< $min; print "Price: " $wt * $price, "\n"; print "Next Weight: "; chomp($wt = <stdin>); }
Cheers,
Rob