my $repository = $switches{u} =~ /^http:\/\// ? $switches{u} : 'http://www.myserver.com/mysite/update.txt'; my $raw = get_object($repository, 'pronbot_update_tgps'); my @lines = split /\n/, $raw; my @new; !$resources{$_} && push(@new, $_) foreach (@lines);