foreach my $h (@ente) { my $output = `smartctl \-l ssd $h| grep Percent | cut \-c 29,30 `; # .... weitere Kommandos .... if ($output > 89) { exit(2); } }