Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Some help with my project:

by toolic (Bishop)
on Jan 16, 2017 at 19:16 UTC ( #1179691=note: print w/replies, xml ) Need Help??


in reply to Some help with my project:

This is the only line that could generate that message (although it doesn't look like line 35):
my $monit_percentual = ( $avail / $avail+$used ) * 100 ;

UPDATE (dave_the_m): That means $avail is probably 0 ($avail+$used)=0 (probably both variables are 0). Tip #2 from the Basic debugging checklist: print

Also:

Replies are listed 'Best First'.
Re^2: Some help with my project:
by dave_the_m (Monsignor) on Jan 16, 2017 at 19:26 UTC
    That means ($avail+$used)=0
    Due to precedence, it actually means $avail is zero. The OP probably meant to write
    my $monit_percentual = ( $avail / ($avail+$used) ) * 100 ;

    Dave.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1179691]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2022-01-19 17:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (55 votes). Check out past polls.

    Notices?