mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-29 07:27:59 +01:00
Merge pull request #58 from spider-mario/master
Avoid making ponysaylinklist.pl depend on List::MoreUtils.
This commit is contained in:
commit
9de3c3117b
1 changed files with 7 additions and 7 deletions
|
@ -13,19 +13,19 @@
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use utf8;
|
use utf8;
|
||||||
use List::MoreUtils qw(natatime);
|
|
||||||
|
|
||||||
my %hash;
|
my %hash;
|
||||||
|
|
||||||
my $it = natatime 2, @ARGV;
|
{
|
||||||
while (my ($source, $target) = &$it) {
|
local @ARGV = @ARGV;
|
||||||
unless ($source eq $target) {
|
while ((my ($source, $target), @ARGV) = @ARGV) {
|
||||||
push @{$hash{$target}}, $source;
|
unless ($source eq $target) {
|
||||||
|
push @{$hash{$target}}, $source;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$it = natatime 2, @ARGV;
|
while ((my ($source, $target), @ARGV) = @ARGV) {
|
||||||
while (my ($source, $target) = &$it) {
|
|
||||||
if ($source eq $target) {
|
if ($source eq $target) {
|
||||||
my @list = @{$hash{$source} // []};
|
my @list = @{$hash{$source} // []};
|
||||||
print $source;
|
print $source;
|
||||||
|
|
Loading…
Reference in a new issue