"Therefore you are to be perfect, as your heavenly Father is perfect. (Matthew 5:48 NASB)
Therefore you are to be perfect... I think it is absurd to take this text alone and teach some sort of sinless perfection, but at the same time let's not miss the whole purpose of this section of scripture. Starting in Matthew 5:17-20, we get an introduction which is basically stating that your righteousness must exceed the righteousness of the scribes and Pharisees to enter into the Kingdom of Heaven, then Jesus lays out a group of laws and how you can exceed the righteousness of the letter of those laws.
After laying out 6 laws and how to fulfill them, and to practically exceed the righteousness of the Pharisees Jesus then concludes with Matthew 5:48. Therefore you are to be perfect, as your heavenly Father is perfect. The word therefore brings us a connection from all the previous teaching concerning those six laws and then draws the conclusion giving a command to be perfect.
This section of the Sermon on the Mount could have gone on much longer as Christ could have expounded the intents of each law and practical methods towards their fulfillment, but that would have been unnecessary. Jesus uses just enough laws to make His point and leaves it to the believer empowered by the Spirit to discern the intents and fulfillments of other laws, ie honoring your parents, not coveting... etc. Another important aspect of this section is that Christ is not taking the law as a group of 'shall nots' or items which are meant not to be violated. Christ turns the law on its head and changes it from a prohibition against certain behavior into a mandate to act. In other words instead of the law putting to death sinful actions, it should give life to righteous actions. Therefore be perfect... the command to be perfect is not a command to stop sinning as much as it is a command to act out the righteousness that exceeds the law. Jesus is systematically putting to death the religious notion of do's and don'ts and laying out a lifestyle of perfection. Not perfection in the sense of being without sin, but perfection in the sense of exceeding the righteousness of the law.
It is unfortunate that I cannot quite find the right words to explain this, my suggestion would be to read Matthew 5:17-48 through a few times, and take it altogether as one teaching, pray over it, and see what the Lord shows you. This should be a very empowering section of scripture, and it should give you great hope because when reading it as a believer you should get the sense that exceeding the law really is a possibility. Achieving the standard of the law by not sinning is an impossibility, we all know from life that a constant focus on not doing something will eventually lead you into doing the very thing you are focused on not doing. Jesus is offering practical application to laws giving us something to do with regard to law not a command that leads to death, but taking the command that produces death and turning it into one which produces life.
I suppose I am rambling so I will stop.