As a woman, writing from a male perspective is challenging. There are so many differences in the way men and women react or feel. However, men have written female characters or played female roles onstage for a long time. It is only fair that women should be able to write effective male main characters.
The fundamentals of human behavior, thought and emotion know no boundaries. Sometimes women act more like men, and sometimes men more like women. Deep inside, we all feel the same fears, hopes and joys. The interesting part is how we express those feelings and, I believe that well-written characters who are complex will be good whether or not they match the gender of the writer. After all, J.K. Rowling (a woman) wrote the memorable character, Harry Potter (a boy/young man), who endured through a seven book series.
I am really just encouraging myself here, since one of my projects has male protagonists. I can do this, right?