mecrazycoder,
Assuming you are in fact using
WWW::Selenium, have you read
Using WWW::Selenium To Test Or Automate An Ajax Website? I ask because one of the problems I encountered was dealing with AJAX where the page would indicate it was fully loaded when it wasn't so certain things wouldn't work. Also, there is a method to get a list of links on the page. You might want to get a list of links before clicking so that if it fails you can dump what was there to compare it with what you think
should be there.