Thanks for the thorough explanation... I had the feeling that evaling JQuery might have been probably overkill for what I really need. Yep, I looked at mechanize::firefox but it seems to require firefox running with a GUI. Do you know if there is any way to run firefox without GUI or run the Gecko engine as a library, I mean much like Spidermonkey? Maybe using Xvfb or maybe Firefox itself has the ability to run GUI-less like other GUI-intensive apps?, for example Inkscape which has a console/batch mode (e.g. to convert SVG to PDF).