in reply to How to scrape data from ajax calls
Well, I see about 219 CPAN packages for “GMail” at search.cpan.org, and 548 for “Google,” so perhaps you could start there...
Remember: “DRY = Don't Repeat Yourself.” In fact, don't repeat anyone in the world if you can help it.
You can be absolutely sure that you are not the first person to have worked on getting useful information from Google or GMail. You can also be sure that, as soon as someone's put together a decent and general-purpose “way to do that,” it's going to show up on CPAN. Therefore, practical software-development in the Perl world consists very heavily of searching for, discovering, and then leveraging existing well-tested software assets from CPAN and other sources. Your task is surely no exception. There is absolutely nothing about “dealing with AJAX, either as a client or as a server,” that you must “invent.”
This way of thinking does take some getting used to, because in the academic world “borrowing somebody else's work” is called “cheating.”