Skip to content

Instantly share code, notes, and snippets.

@poppen
Created August 6, 2011 10:59
Show Gist options
  • Select an option

  • Save poppen/1129264 to your computer and use it in GitHub Desktop.

Select an option

Save poppen/1129264 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use warnings;
use strict;
use utf8;
use Encode;
use Finance::Quote;
my $q = Finance::Quote->new;
my %quotes = $q->fetch( 'bloomberg_stocks_index', "MXKO:IND" );
# MSCI KOKUSAI指数を取得
print encode( 'utf8', "指数:" ), $quotes{ 'MXKO:IND', 'name' }, "\n";
print encode( 'utf8', "価格:" ), $quotes{ 'MXKO:IND', 'price' },
$quotes{ 'MXKO:IND', 'currency' }, "\n";
print encode( 'utf8', "騰落率:" ), $quotes{ 'MXKO:IND', 'p_change' }, "%\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment