if (-e "data/$file.data") || (-e "data/$otherfile.data") { print " Hooray at least one of the the files exists"; } else { print "Hohum neither of the files exist"; }