sorting sources

I've did a small bash script that retrieve the sources from gnc-fq-dump and try to find one source that has the specific stock. At that point I've noticed that the sources returned by Finance::Quote have always a different order. Just wondering if it is done in that way intentionally (?)
This commit is contained in:
Sebastian Ovide 2021-01-10 15:09:51 +00:00 committed by GitHub
parent 5378023075
commit 49ce463aaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,7 @@ my $q = Finance::Quote->new;
$q->timeout(60);
if ($#ARGV < 1) {
my @sources = $q->sources();
my @sources = sort $q->sources();
printf "\nUsage: $0 [-v] <quote-source> <stock> [<stock> ...]\n\n";
printf "-v: verbose\n";
printf "Available sources are: \n %s\n\n", join(' ', @sources);