mirror of
https://github.com/erkin/ponysay
synced 2024-11-13 23:27:14 +00:00
Avoid making ponysaylinklist.pl depend on List::MoreUtils.
This commit is contained in:
parent
a42fe1fd4e
commit
7faba4584f
1 changed files with 7 additions and 7 deletions
|
@ -12,19 +12,19 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use List::MoreUtils qw(natatime);
|
||||
|
||||
my %hash;
|
||||
|
||||
my $it = natatime 2, @ARGV;
|
||||
while (my ($source, $target) = &$it) {
|
||||
unless ($source eq $target) {
|
||||
push @{$hash{$target}}, $source;
|
||||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue