http://qs321.pair.com?node_id=1179757


in reply to Re^2: Some help with my project:
in thread Some help with my project:

my $monit_percentual = (  $avail  /  $avail+$used  ) * 100 ;

"it will prevent these kind of error if future"

If you want to prevent errors be aware of perlop "Operator precedence and associativity".

use strict; use warnings; my $avail = 1; my $used = 1; my $testa = ( $avail / $avail + $used ) * 100; my $testb = ( $avail / ( $avail + $used ) ) * 100; print "testa: $testa\ntestb: $testb\n";