aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-05-09 01:20:49 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-05-09 01:20:49 +0200
commit3013d5e295035c8a1e98fe97d98e59b10d208c04 (patch)
tree5f99b0f305b4929ca09ff95c59454c575e4ff37e
parent115cb64a6a4d43d610b034a8ded9f3db23cdcd83 (diff)
downloadperlisdead-3013d5e295035c8a1e98fe97d98e59b10d208c04.tar.gz
Forgot hashes aren't ordered
-rwxr-xr-xrun/p5p12
1 files changed, 6 insertions, 6 deletions
diff --git a/run/p5p b/run/p5p
index 165ad43..5e54f98 100755
--- a/run/p5p
+++ b/run/p5p
@@ -5,16 +5,16 @@ use warnings;
use Net::NNTP;
use HTML::Entities;
-my %alt = (
- 'nntp.perl.org' => 'perl.perl5.porters',
- 'news.gmane.io' => 'gmane.comp.lang.perl.perl5.porters',
+my @alt = (
+ ['nntp.perl.org' => 'perl.perl5.porters'],
+ ['news.gmane.io' => 'gmane.comp.lang.perl.perl5.porters'],
);
my ($nntp, $count, $first, $last);
-for my $server (keys %alt) {
- $nntp = Net::NNTP->new($server, Timeout => 10)
+for my $alt (@alt) {
+ $nntp = Net::NNTP->new($alt->[0], Timeout => 10)
or next;
- ($count, $first, $last) = $nntp->group($alt{$server});
+ ($count, $first, $last) = $nntp->group($alt->[1]);
last;
}
die "Cannot retrieve news: $!" if not $nntp;