sub check_mount{ my ($must_mounted ,my $is_mounted) = @_; my %erg; my @not_mounted; while ( my ($key, $value) = each(%$must_mounted) ) { if ( not exists $is_mounted->{$key}){ push(@not_mounted,$key); $erg{'servity'}='critical'; $erg{'mounts'} = \@not_mounted; } }; return \%erg; };