Hi List,I am trying to use the exchange rate posted on the list a few weeks ago. But the user tag is returning empty, so I cannot update my locale table, the user tag is like this, I am sure there is something wrong in the code, because it was working a few days ago.
My code is this:
UserTag exchange-rate Order currency
UserTag exchange-rate PosNumber 1
UserTag exchange-rate Routine <<EOR
sub {
my ($currency) = @_;
my $url;
if ($currency eq 'EUR') {
$url =
'http://finance.yahoo.com/currency/convert?amt=1&from=COP&to=EUR&submit=Convert';
}
if ($currency eq 'USD'){
$url =
'http://finance.yahoo.com/currency/convert?amt=1&from=COP&to=USD&submit=Convert';
}
else {
$url =
'http://finance.yahoo.com/currency/convert?amt=1&from=USD&to=COP&submit=Convert';
}
use LWP::Simple;
my $content = get $url;
#die "Couldn't get $url" unless defined $content;
$content =~ /(\d\.\d{2,5})(.........)/;
$Scratch->{rate} = $1;
return $1;
exit;
}
EOR
Please I need some help with this, it is supposed to be working for today!!!
Thanks
Daniel
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.