Hmm, let see. How about you start with WWW::Mechanize? From my own experience, once I give it a URL, the crawler will just walktrough no matter how many time it was redirected to. I'm not sure what you mean by 'recognizing', but I need to teach it a little bit on how to find something I want.
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!