I am a woman. I have had to deal with these types of people repeatedly especially when I was young (the workplace was much worse in those days about harrassing behavior being acceptable). I have seen a lot of other women put in the postion of dealing with these types of people.
First, you have to stand up and look out for yourself. You describe him as perverted. Follow your own instincts that are telling you to stay away from this person as much as possible. Try never to be alone with him. Never be in a room with a closed door. Protect yourself. Always trust your instincts when someone makes you feel uncomfortable. And if other people shy away from him as well, trust their judgement as well and do the same. This person is NOT your friend. He has bullied and harrassed you. Spend as little time with him as your jobs allow. If you can get away from him without having to make a complaint, you personally will be better off.
Now as to dealing with it. There are several approaches but it is incumbent on you to make sure that you first directly tell this person not to leer at women in front of you and not to talk about it when you are present. You do not have to put up with this behavior. Be crystal clear, if he says this is normal behavior, challenge that and tell him in no uncertain terms that the behavior is not acceptable to you and not acceptable in the work place.
Some others have suggested possible ways to word it, think carefully about what you want to say. Women tend to say these things in a more indirect manner, this is a case where you have to be direct. If he does this in public, tell him in public that you don't appreciate it. If you need to escalate to HR, it is preferable that others have seen you actually tell this person that the behavior was unacceptable to you. Do this calmly without getting angry or upset.
Talk to some other women in your office about how they would handle such a thing. You need to know what the organizational norm is for this. Some places will be accepting of harrassing behavior and will think you are in the wrong no matter what you do. You need to know this before you choose to do something beyond asking him to stop. (This would of course be a good reason to look for a better place to work!) You will also need allies if this thing goes further.
The next step after you ask him to stop if he doesn't stop is usually to talk to your boss and ask him to ask the guy to stop the unprofessional behavior because it makes you feel uncomforatble. Most bosses are much more aware of how harrassment is unacceptable in the workplace, so many of them will try to fix it before it becomes an HR issue that embarrasses them and hurts their own career. (Incidentally, you want to work for the supportive bosses for many reasons beyond protection from harrassment, so make sure to evaluate the personality of the boss when you look for jobs in the future.)
If at all possible do not go to HR with this unless you are in fear or the behavior increases in frequency or esclates after you ask him to stop. Do not go to HR unless you have actual proof of the behavior, otherwise it is a useless exercise of he said/she said. Document the day you tell him not to do this anymore and document every incident after that day. If possible get witnesses (many people won't want to get involved, don't be shocked at this.). If you have a personnel manual, check out what it says about how to handle harrassment.
You may also need to to make sure that other men in your group know that you are not one to complain at any slight thing. It can make your work relationships very awkward if you put in a harrassment complaint. People will be afraid of you.
So you need to think of how to make sure that other people understand that this was way beyond the bounds, not ordinary office joking around. One way to do this is to be relaxed around other males in the office and to laugh at jokes. You do not want to be perceived as a humorless B*#ch out to get any man. You need to have developed good relationships with your other co-workers before doing this.
And it is hard to put into words, but you want to make sure you are not expecting one standard from this guy and allowing other guys you like more to have more latitude. So being friendly with the other co-workers is fine line to define, be friendly and laugh at jokes, but not ones the same or worse than what you are complaining about. In other words, don't give out a mixed message.
And do not put yourself in a position where people will think it is all your fault. So no flirting, no sexy clothes. Never at work. Yeah I know that is unfair, but life is unfair.
I have seen that it is easier for people to accept where you draw the line, if you are consistent about it. I have seen very religious women who are offended by even the mildest profanity treated far better for speaking up than women who are perceived as inconsistent (people don't know when they might suddenly find themselves defending against a complaint) or sexy (you will be perceived as at fault) who complain about far more serious behavior. Above all, never make the complaint to HR the first step. No one will ever trust you.
You want to have a track record of being good at your job as well. Yes I know that no one should be harrassed, but in all honestly, if he is perceived as good at his job and you are perceived as not so good, the he said/she said thing will come down in his favor. In the long run if the situation does not change, one of you could be leaving, so make sure the company wants you to be the one they keep.