Perl is a great choice for getting started with this kind of problem. It's much easier to experiment with different algorithms and techniques in a high-level language like Perl than a low-level one like C. Once you've gotten comfortable with things, you might decide that a different language is better for your purposes, but Perl is a great place to start!
This is a huge and very interesting field. You might start by reading about statistical classification.