aboutsummaryrefslogtreecommitdiff
path: root/ponysaylinklist.pl
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-07-28 05:42:37 -0700
committerMattias Andrée <maandree@operamail.com>2012-07-28 05:42:37 -0700
commit9de3c3117b1a2b58b45c42e37e888a1344ce71e7 (patch)
treecec6ce558b104db0ae67fd0e0ceaa70c8497dae4 /ponysaylinklist.pl
parent04e2cf91c47344da39b75011802f088a0ca85d8b (diff)
parent7faba4584f360df4c2c12f52bb1784c08c0dca57 (diff)
downloadponysay-9de3c3117b1a2b58b45c42e37e888a1344ce71e7.tar.gz
ponysay-9de3c3117b1a2b58b45c42e37e888a1344ce71e7.tar.bz2
ponysay-9de3c3117b1a2b58b45c42e37e888a1344ce71e7.zip
Merge pull request #58 from spider-mario/master
Avoid making ponysaylinklist.pl depend on List::MoreUtils.
Diffstat (limited to 'ponysaylinklist.pl')
-rwxr-xr-xponysaylinklist.pl14
1 files changed, 7 insertions, 7 deletions
diff --git a/ponysaylinklist.pl b/ponysaylinklist.pl
index 8f3588f..b7b4c6e 100755
--- a/ponysaylinklist.pl
+++ b/ponysaylinklist.pl
@@ -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) {
- 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;