From a32173ace60df5a1e9414f5e95b556c436f62718 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 3 Aug 2004 04:34:50 +0000 Subject: changes --- scripts/getquote | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) mode change 100755 => 100644 scripts/getquote (limited to 'scripts/getquote') diff --git a/scripts/getquote b/scripts/getquote old mode 100755 new mode 100644 index 8daf6633..cf8c8abd --- a/scripts/getquote +++ b/scripts/getquote @@ -1,14 +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"; -} else { - exit 1; } -- cgit v1.2.3