Having not gone to college for Computer Science, or anything at all like it (I finished 2 years of Fine Arts Painting). I never had to build the requisite stacks, trees and other such classic CS data-structures, nor did I have to re-invent the wheel because a teacher didn't allow the use of modules (as it seems is the trend by all the homework that the college interns at work have to do). So for my own self-education I have re-invented countless wheels and re-created the equivalent of alot of low-level unctions found in most "standard libraries" (usually pretty badly I'm sure).
This too is actually my prefered way of learning a new language. I build some well known and understood data-structures and/or re-implement my favorite module/tool from another language. For instance, I built a Tree object in C# recently to help learn the language, and I am currently building an HTML::Template-like module in C# as well (cause I hate the code-markup mix of ASP.NET). These efforts have helped me immensely in understanding the ins and outs of C#, and of course this too has helped me in Perl as well.
Basically, what I am saying is that wheel re-invention can be an excellent learning tool. But I do agree with alot of the posters above, that re-inventing the wheel makes no sense if you are ignorant of the other options out there.