I guess that MS Agent Pause didn't return any helpful links, as you turned to a site called Perlmonks with a Javascript question?
At least for me, the Google search provided documentation that seemed to help, but as you didn't post any Perl code that's ready to run, I can't easily verify the proposed solution.