Merge pull request #58 from spider-mario/master

Avoid making ponysaylinklist.pl depend on List::MoreUtils.
This commit is contained in:
Mattias Andrée 2012-07-28 05:42:37 -07:00
commit 9de3c3117b

View file

@ -13,19 +13,19 @@
use strict;
use warnings;
use utf8;
use List::MoreUtils qw(natatime);
my %hash;
my $it = natatime 2, @ARGV;
while (my ($source, $target) = &$it) {
{
local @ARGV = @ARGV;
while ((my ($source, $target), @ARGV) = @ARGV) {
unless ($source eq $target) {
push @{$hash{$target}}, $source;
}
}
}
$it = natatime 2, @ARGV;
while (my ($source, $target) = &$it) {
while ((my ($source, $target), @ARGV) = @ARGV) {
if ($source eq $target) {
my @list = @{$hash{$source} // []};
print $source;