if (($lun_mig_split[1] == $lun_mig_split2[1]) && ($lun_mig_split[2] eq $lun_mig_split2[2])) { Do something }