Using Finance::Quote to watch exchange rates

Since I’m often receiving payments in USD I need to keep track of the USD/EUR exchange rates.

I don’t want to run any GUI apps for that though or visit web sites, so I just slightly adapted the Finance::Quote Perl module’s simple example to do what I need:

#!/usr/bin/perl
 
use Finance::Quote;
 
$q = Finance::Quote->new;
$q->timeout(60);
 
print $q->currency("USD","EUR")."\n";

A functional interface for trivial queries like that would be nice in any case. Finance::Quote has one but it’s deprecated; maybe the authors are Java zealots.

No comments yet. Be the first.

Leave a reply