From 158f68669c17f74f7da672b636a966741c330151 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 4 Dec 2022 18:33:45 +0100 Subject: update-autocomplete: remove duplicate station names --- scripts/update-autocomplete | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/update-autocomplete b/scripts/update-autocomplete index 4dc64ae..de5e7d2 100755 --- a/scripts/update-autocomplete +++ b/scripts/update-autocomplete @@ -6,10 +6,11 @@ use 5.020; use JSON; use File::Slurp qw(write_file); +use List::Util qw(uniq); use Travel::Status::DE::IRIS::Stations; my @station_names - = map { $_->[1] } Travel::Status::DE::IRIS::Stations::get_stations(); + = uniq map { $_->[1] } Travel::Status::DE::IRIS::Stations::get_stations(); my $station_list = q{}; for my $station (@station_names) { -- cgit v1.2.3