--- check_mem.pl~ 2008-06-25 12:59:55.000000000 +0200 +++ check_mem.pl 2008-06-25 13:00:55.000000000 +0200 @@ -78,9 +78,14 @@ print_usage() unless (($opt_c) && ($opt_w)); -my ($mem_critical, $swap_critical) = ($1,$2) if ($opt_c =~ /([0-9]+),([0-9]+)/); -my ($mem_warning, $swap_warning) = ($1,$2) if ($opt_w =~ /([0-9]+),([0-9]+)/); +# initialisation +my $mem_critical = 0; +my $mem_warning = 0; +my $swap_critical = 0; +my $swap_warning = 0; +($mem_critical, $swap_critical) = ($1,$2) if ($opt_c =~ /([0-9]+),([0-9]+)/); +($mem_warning, $swap_warning) = ($1,$2) if ($opt_w =~ /([0-9]+),([0-9]+)/); # print threshold in output message my $mem_threshold_output = " (";