in reply to Currency Exchange Rate Programming

This will do the trick. I have only supplied the all important convert function. I leave to you to wrap what ever code you require around it.

use LWP::Simple; ... sub convert { $_=get("http://www.oanda.com/converter/ classic?value=$amount&exch=$fc&expr=$tc"); s/^.*<!-- conversion result starts//s; s/<!-- conversion result ends.*$//s; s/<[^>]+>//g; s/[ \n]+/ /gs; print $_, "\n"; }

mitd - Made in the dark.

Replies are listed 'Best First'.
Re: Re: Currency Exchange Rate Programming
by bladx (Chaplain) on Aug 27, 2001 at 03:00 UTC
    Thanks for the snippet, I need to learn me some LWP soon! Thanks again, I will begin work on this project, and let you know if I run into any problems.

    Andy Summers