sub check_mount(){ my $must_mounted = shift(@_); my $is_mounted = shift(@_); 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; };