#!/usr/bin/perl
use Finance::Quote;
$q = Finance::Quote->new();

my $stock="ALPHA";
my %result = $q->fetch("asegr",$stock);
if ($result{$stock,"success"}){
print "Exchange:\t".$result{$stock,"exchange"}."\n";
print "Stock Marker:\t".$result{$stock,"name"}."\n";
print "Last:\t\t".$result{$stock,"last"}."\n";
print "Date:\t\t".$result{$stock,"date"}."\n";
print "Percent Change:\t".$result{$stock,"p_change"}."\n";
print "Opening:\t".$result{$stock,"open"}."\n";
print "High:\t\t".$result{$stock,"high"}."\n";
print "Low:\t\t".$result{$stock,"low"}."\n";
print "Close:\t\t".$result{$stock,"close"}."\n";
print "Volume:\t\t".$result{$stock,"volume"}."\n";
print "Currency:\t".$result{$stock,"currency"}."\n";
print "Method:\t\t".$result{$stock,"method"}."\n";
}
else {
	print "ERROR!\n".$result{$stock,"errormsg"}."\n";
}
$q->timeout(60);


