Perl programmer for hire: download my resume (PDF).
John Bokma Perl
freelance Perl programmer

Comments: Google calculator interface


The Perl program on this page is an example, for educational purposes only, of how to use the LWP::UserAgent and HTTP::Request::Common modules to download a web page and extract information from it. It doesn't use the Google API since the Google calculator is not yet supported by this API. Hence, this program might be and infringement on the use of Google.

Read the rest of Google calculator interface.


You may also be interested in this keyboard interface I wrote in JavaScript for the Google Calculator:


2M6T52 + 3T6

by using the [H] [T] [M] keys.

Any feedback or suggestions will be appreciated.


James Redin

Posted by xnumber at 20:24 GMT on 4 July 2005

Hi James,

Looks very cool, thanks for the link.

Posted by John Bokma at 20:53 GMT on 4 July 2005

For those of use behind proxies, calling $ua->env_proxy before the $ua->get is necessary. Great script!

Posted by OGM at 20:09 GMT on 6 October 2005

It's worth adding: [code] $result =~ s/&\#215;/\xd7/g; [/code]

to the rewrites, which removes the "x" like multiplication symbol from results (look up "h*k" for an example).

Posted by Jokel at 16:20 GMT on 25 May 2006

Post a comment

Note that your comment doesn't show up immediately. I review each comment before I add it to this site.

Check the Follow this page option if you want to receive an email each time a comment is posted to this page, including yours. A link to turn this option off will be included with each email.

Internet adresses will be converted automatically. You can use the following notation to specify anchor text for a link: [url=]example text[/url].