I haven't used it myself, but JavaScript::SpiderMonkey and the javascript.pm modules both say they can eval js code by providing interfaces to two different javascript engines.
I could have sworn I saw someone talking about a subclass of WWW::Mech that spoke javascript, but I guess I was wrong.
--
jpg
Comment on Re: Javascript and Web-site navigation using LWP, et. al