From c9fb11bd60a2170fb896d77ff8d7706f563ad597 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 8 Nov 2004 06:43:11 +0000 Subject: updated to version 2.0 --- scripts/getquote | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 scripts/getquote (limited to 'scripts/getquote') diff --git a/scripts/getquote b/scripts/getquote old mode 100644 new mode 100755 index cf8c8abd..bed561d6 --- a/scripts/getquote +++ b/scripts/getquote @@ -1,16 +1,16 @@ #!/usr/bin/perl -exit 0 if $ARGV[0] eq "\$"; +$timeout = 60; use Finance::Quote; $q = Finance::Quote->new; - -$q->timeout(60); +$q->timeout($timeout); $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