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.
Hi James,
Looks very cool, thanks for the link.
For those of use behind proxies, calling $ua->env_proxy before the $ua->get is necessary. Great script!
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).
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=http://example.com/]example text[/url].
You may also be interested in this keyboard interface I wrote in JavaScript for the Google Calculator:
http://www.xnumber.com/google_calc.htm
Try:
2M6T52 + 3T6
by using the [H] [T] [M] keys.
Any feedback or suggestions will be appreciated.
Thanks!
James Redin