while ( defined ($line = $ssh->read_line()) ) { if($line =~ m/zfs/) { open(MIR,">>$MIRRORS"); print MIR "$_ - has ZFS root, no metadevices exist\n"; close(MIR); } else { # Not ZFS, presumably ufs # Execute SVM Mirror check - looking for unsynched mirrors my $mirror_output = $ssh->send("$mirror_cmd"); my $line2; while ( defined ($line2 = $ssh->read_line()) ) { my $tmpcount = ($line2 =~ tr/d//); if($tmpcount < 3) { open(MIR,">>$MIRRORS"); print MIR "$_: "; chomp(); print MIR "$line2 - Not Mirrored\n"; close(MIR); } } } }