From R' Aviner's blog:
Question: I am always hearing that mixed society is forbidden according to the Torah. I hear this from all of the rabbis - Ashkenazim, Sephardim, Charedim, National Religious – except for a small minority of rabbis who do not belong to the first line of great halachic authorities. I therefore understand that the views of that minority are halachically null and void.
But I am still not clear on one point: Surely there are parts of our life that are gender-mixed against our will, and I don't see how it is possible to change that. Therefore, instead of making a generalized decree prohibiting mixed company, wouldn’t it be better to provide us with guidance for those parts of our life which are mixed (against our will), so that we will know how to build a mixed society that is kosher?
Answer: Good for you that you distinguish between what is mixed against our will and what is allowed to be separate. Regarding the first, we must follow Halachah. Regarding the second, we must keep the genders separate. This distinction already exists in the Talmud, where it says that if a person has a choice of two paths, one in which he will encounter women and the other in which he will not, and he selects the former, then he is classified as an evildoer, but if there is no other path, then he can take the path where the women are, but he should try not to sin, such as by closing his eyes so he doesn't see what is forbidden for him to see (Bava Batra 57b).
Take, for example, the case of a wedding. You can't hold two weddings, one for the groom (with the men) and one for the bride (with the women). There is no alternative to the men being present at the Chupa where the bride is. Therefore, the solution is for the bride to cover her face with a veil.
Another example is a funeral. After all, only one deceased party is being buried, and you cannot hold two funerals, one for men and one for women. The Talmud therefore enlists the verse, "The Land shall wail, each family by itself, the family of the House of David by themselves, and their womenfolk by themselves" (Zechariah 12:12). In other words, there is a need for them to stand separately, even though the verse is talking about a serious and somber occasion - the future killing of Mashiach ben Yosef during the war of Gog and Magog. The Talmud adds that at that time, the evil impulse will no longer reign, and yet the men and women must still be separate from one another (Sukkah 52a).
Or, to take a happier example, we have the case of the “Simchat Beit Ha-Sho'eva”, the Water-Drawing celebration held during the intermediate days of Sukkot. Here, as well, there is no alternative to mixed company, for there are not separate Temples for men and women. At first, the men were on the inside and the women on the outside, but they saw that that was immodest. So the arrangement was changed: the men were below and the women above. This they found to be modest.
A mixed gender event was thus held in a permissible manner (Sukkah 51a).
The question of mixed society arises at work as well, for men and women often work in the same environment. If there is a way to separate them, you certainly must do so. Sometimes, however, it is imperative that they work together, so you must take pains to ensure that the mixed society is Kosher.
Rambam summarized his guidelines under the general heading of, "They must keep themselves far apart" (Hilchot Isurei Bi'ah 22), and the same appears in Shulchan Aruch, Even Ha-Ezer Chapter 21. In addition, Rabbi Shlomo Ganzfried provides guidelines on this topic in his easy-to-read halachic digest, Kitzur Shulchan Aruch: “A man has to remain very far removed from women. He is not allowed to send signals to a woman with his hands or his feet or his eyes. He is forbidden to joke with her, to be frivolous with her, or to gaze at her beauty. He is forbidden to smell perfumes meant for a woman... he is forbidden to gaze at a women's colored clothing… if somebody gazes at a woman, even her pinky finger, and he intends to have pleasure from it, his sin is very great indeed. It is forbidden to hear a woman's singing voice, or to look at her hair. One shouldn't say hello to a woman at all." (Kitzur Shulchan Aruch 152:8-9)
In any event, we have to maintain as much separation as we can (Responsa Radbaz 3:481).
There are also family gatherings which cannot be kept gender-separate, for the entire family is one. Yet, legally speaking, our relationship to cousins or uncles or brothers-in-law is the same as our relationship to anybody else, and even more severe, as is well-known, since the parties know one another. Therefore you must, even in this case, be as cautious on all of the same points mentioned regarding co-workers.
Yet there are spheres in which the genders have no need to mix. As, for example, at a joint meal or outing. Rambam writes:
“The courts must appoint policemen who will patrol and comb the gardens, orchards and river-banks during the festivals, to prevent men and women from gathering there to eat and drink, lest they be led to sin. Likewise, they must warn the entire population about this lest they hold mixed celebrations in their homes.” (Rambam, Hilchot Yom Tov 6:21).
Moreover, these ideas are quoted by the Shulchan Aruch, which concludes, “Rather, they should be holy” (Orach Chaim 529:4). The Mishnah Berurah (#22) points out that the duty of separation does not only apply on festivals, but on regular weekdays as well. The only difference is that on festivals the problems are more common (and Sha'ar Tziyun #21).
Nowadays, we are obviously not going to post policemen. I am merely bringing examples of situations in which separation is warranted.
Another example in which separation is possible, and therefore must be maintained, at wedding meals and Sheva Berachot. If the men and women can see one another, then the words, “Let us bless our G-d, in whose abode there is joy” should not be recited, as there is no joy before G-d under those circumstances (Bach, Even Ha-Ezer 62; Kitzur Shulchan Aruch 149:1).
In conclusion, Maran Ha-Rav Avraham Yitzchak Kook wrote: “Striving to prevent gender mingling at gatherings is a theme that runs throughout the entire Torah” (Ma’amarei Ha-Re’iya, p. 189).
All efforts to mix men and women together should be directed towards one thing: Strengthening the love and brotherhood, peace and friendship between husband and wife. We must also help unmarried men and women to wed. As is well known, the more the genders are kept separate, the more marriages take place, the less divorces occur, and the more the couples live together in love and brotherhood, peace and friendship.