Jesus continuously said things that got to the heart of the matter. This example is no different.
In your quote from Matthew we see a young man that wants to know what good thing he must do to get eternal life. Eventually, Jesus says what you have quoted.
What the man then does and what Jesus says immediately after revels what Jesus meant.
22 When the young man heard this, he went away sad, because he had great wealth.
You see he loved his wealth more than life! He was willing to forego eternal life in the Kingdom of God for money here on Earth! Jesus got to the heart of the matter for that young man; the thing that was keeping him from truly following God. He goes on to say:
23 Then Jesus said to his disciples, “Truly I tell you, it is hard for someone who is rich to enter the kingdom of heaven. 24 Again I tell you, it is easier for a camel to go through the eye of a needle than for someone who is rich to enter the kingdom of God.”
This verse is highly debated, but most agree on at least this: Jesus is saying that for a man like this one, gaining eternal life will never happen as long as money is in his way; as long as love for money is in his heart.
But the most important part follows:
25 When the disciples heard this, they were greatly astonished and asked, “Who then can be saved?”
26 Jesus looked at them and said, “With man this is impossible, but with God all things are possible.”
You cannot save yourself! Whatever you do, you cannot satisfy God's wrath. You will still deserve death. But by God's super-abundant grace, you can be saved.
So you see the issue was not money, specifically. The issue is anything that is in your way from truly loving God and following Him wholeheartedly. It is then that His grace will save you and you will gain eternal life.1
The short answer to your exact question in light of the above:
Though Jesus likely gave to the poor regularly, he almost certainly earned and used money in the same way we do. He needed to make a living just like everyone else. Also, he was not making a description of "perfect" as much as he was showing that a perfect man has nothing between himself and God.
Though I have not given a doctrinal perspective, I think I have represented the majority of Christianity in the interpretation of these verses.
1) ADDENDUM
There are other teachings from Jesus that say the same thing but use other things as the example that comes between you and God. Jesus did say you must "hate" your entire family and yourself before you can be His follower Luke 14:26. If we follow the plain logic that your question and comments adhere to then we are stuck asking what the disciples did: If all with a family are doomed "Who then can be saved?" And Jesus then would correct us and saying "With man this is impossible, but with God all things are possible." So you see, again, the issue is anything that comes between you and God. Whatever that thing is is actually much less important.
The scripture is filled with encouragements to remove all things that cause you to stumble and not follow God. The language in them is rough and ridiculous if you think it is literal prescriptive advice. Here are a few:
Mark 9:43 and Matthew 18:8 - "If your hand causes you to stumble, cut it off. It is better for you to enter life maimed than with two hands to go into hell, where the fire never goes out." Surely, you are not to cut off parts of your body. It is equally ridiculous to blame your eyes for engaging in fornication. However, it is not ridiculous to blame your lusts on the filthy television you watched last night, for example.
1 Corinthians 8:9 Says to even remove things from your life that can cause others to sin - "Be careful, however, that the exercise of your rights does not become a stumbling block to the weak." There is no ridiculous language in these verses; it is straight forward and gives a real example: eating animals that have been sacrificed to idols (though I admit that is less of a problem today).
Luke 14:26 -- “If anyone comes to me and does not hate father and mother, wife and children, brothers and sisters—yes, even their own life—such a person cannot be my disciple. And whoever does not carry their cross and follow me cannot be my disciple." If we take "hate" literally then it is in contrast with the second greatest commandment. Clearly, the message is that there must be nothing between you and God; to be a disciple of Christ you must be all in or not in at all; you must remove or change anything from your life that prevents you from following Him wholeheartedly.
Matthew 19:24 Again I tell you, it is easier for a camel to go through the eye of a needle than for someone who is rich to enter the kingdom of God.