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