Here is Psalm 49. I noted it due primarily due to the last line, which is also translated as "A man who has riches without understanding is like the beasts that perish."
Psa 49:1 To the chief Musician, A Psalm for the sons of Korah. Hear this, all ye people; give ear, all ye inhabitants of the world:
Psa 49:2 Both low and high, rich and poor, together.
Psa 49:3 My mouth shall speak of wisdom; and the meditation of my heart shall be of understanding.
Psa 49:4 I will incline mine ear to a parable: I will open my dark saying upon the harp.
Psa 49:5 Wherefore should I fear in the days of evil, when the iniquity of my heels shall compass me about?
Psa 49:6 They that trust in their wealth, and boast themselves in the multitude of their riches;
Psa 49:7 None of them can by any means redeem his brother, nor give to God a ransom for him:
Psa 49:8 (For the redemption of their soul is precious, and it ceaseth for ever:)
Psa 49:9 That he should still live for ever, and not see corruption.
Psa 49:10 For he seeth that wise men die, likewise the fool and the brutish person perish, and leave their wealth to others.
Psa 49:11 Their inward thought is, that their houses shall continue for ever, and their dwelling places to all generations; they call their lands after their own names.
Psa 49:12 Nevertheless man being in honour abideth not: he is like the beasts that perish.
Psa 49:13 This their way is their folly: yet their posterity approve their sayings. Selah.
Psa 49:14 Like sheep they are laid in the grave; death shall feed on them; and the upright shall have dominion over them in the morning; and their beauty shall consume in the grave from their dwelling.
Psa 49:15 But God will redeem my soul from the power of the grave: for he shall receive me. Selah.
Psa 49:16 Be not thou afraid when one is made rich, when the glory of his house is increased;
Psa 49:17 For when he dieth he shall carry nothing away: his glory shall not descend after him.
Psa 49:18 Though while he lived he blessed his soul: and men will praise thee, when thou doest well to thyself.
Psa 49:19 He shall go to the generation of his fathers; they shall never see light.
Psa 49:20 Man that is in honour, and understandeth not, is like the beasts that perish.
Barnes says of verse 12, which is closely tied to verse 20:
Nevertheless, man being in honor abideth not - No matter to what rank he may rise, no matter how much wealth he may accumulate, no matter how fixed and secure he may seem to make his possessions, he cannot make them permanent and enduring. He must pass away and leave all this to others. The word rendered “abideth” - ילין yālı̂yn - means properly to pass the night; to remain over night; to lodge, as one does for a night; and the idea is, that he is not to lodge or remain permanently in that condition; or, more strictly, he will not lodge there even for a night; that is, he will soon pass away. It is possible that the Saviour had his eye on this passage in the parable of the rich fool, and especially in the declaration, “This night thy soul shall be required of thee,” Luk_12:20.
He is like the beasts that perish - He is like the beasts; they perish. This does not mean that in all respects he is like them, but only in this respect, that he must die as they do; that he cannot by his wealth make himself immortal. He must pass away just as if he were an animal of the inferior creation, and had no power of accumulating wealth, or of laying plans that stretch into the future. The squirrel and the beaver - animals that “lay up” something, or that, like people, have the power of “accumulating,” die just like other animals. So the rich “man.” His intelligence, his high hopes, his far-reaching schemes, make no difference between him and his fellow-men and the brute in regard to death. They all die alike.