King James Version
1 My son, if thou wilt receive my words, and hide my commandments with thee;
2 So that thou incline thine ear unto wisdom, and apply thine heart to understanding;
3 Yea, if thou criest after knowledge, and liftest up thy voice for understanding;
4 If thou seekest her as silver, and searchest for her as for hid treasures;
5 Then shalt thou understand the fear of the LORD, and find the knowledge of God.
6 For the LORD giveth wisdom: out of his mouth cometh knowledge and understanding.
7 He layeth up sound wisdom for the righteous: he is a buckler to them that walk uprightly.
8 He keepeth the paths of judgment, and preserveth the way of his saints.
9 Then shalt thou understand righteousness, and judgment, and equity; yea, every good path.
10 When wisdom entereth into thine heart, and knowledge is pleasant unto thy soul;
11 Discretion shall preserve thee, understanding shall keep thee:
12 To deliver thee from the way of the evil man, from the man that speaketh froward things;
13 Who leave the paths of uprightness, to walk in the ways of darkness;
14 Who rejoice to do evil, and delight in the frowardness of the wicked;
15 Whose ways are crooked, and they froward in their paths:
16 To deliver thee from the strange woman, even from the stranger which flattereth with her words;
17 Which forsaketh the guide of her youth, and forgetteth the covenant of her God.
18 For her house inclineth unto death, and her paths unto the dead.
19 None that go unto her return again, neither take they hold of the paths of life.
20 That thou mayest walk in the way of good men, and keep the paths of the righteous.
21 For the upright shall dwell in the land, and the perfect shall remain in it.
Interesting that it mentions the upright and perfect as two different statements.
22 But the wicked shall be cut off from the earth, and the transgressors shall be rooted out of it.