From 9ca1d24d30a485300b9486b18c068660da630cc1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 13 May 2004 18:37:12 -0400 Subject: initial import into Darcs --- scripts/getquote | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/getquote (limited to 'scripts/getquote') diff --git a/scripts/getquote b/scripts/getquote new file mode 100755 index 00000000..cf8c8abd --- /dev/null +++ b/scripts/getquote @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +exit 0 if $ARGV[0] eq "\$"; + +use Finance::Quote; + +$q = Finance::Quote->new; + +$q->timeout(60); +$q->require_labels(qw/price/); + +%quotes = $q->fetch("nasdaq", $ARGV[0]); + +if ($quotes{$ARGV[0], "price"}) { + print "\$", $quotes{$ARGV[0], "price"}, "\n"; +} -- cgit v1.2.3