... if (exists $arrayin[0] && $arrayin[0] eq "Spanish_LatinAmerican|es_MX") { $spanishword = trim( $arrayin[1] ); }