diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-08-19 19:52:39 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-08-19 19:52:39 +0200 |
commit | 4774e74ba0af1d1716b832c31e3bf31aed305e4b (patch) | |
tree | a2d2b4fb14895486c04262da022d4bdea7acd7d6 /linklist.pl | |
parent | f763439803559312cd57835d5fc714a963b1788a (diff) | |
parent | 64b726770a07a0e04bcec3cf8ab23af4bcc2332f (diff) | |
download | ponysay-4774e74ba0af1d1716b832c31e3bf31aed305e4b.tar.gz ponysay-4774e74ba0af1d1716b832c31e3bf31aed305e4b.tar.bz2 ponysay-4774e74ba0af1d1716b832c31e3bf31aed305e4b.zip |
Merge branch 'master' into develop
Diffstat (limited to 'linklist.pl')
-rwxr-xr-x | linklist.pl | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/linklist.pl b/linklist.pl deleted file mode 100755 index c0377aa..0000000 --- a/linklist.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl - -# ponysaylist -# Prints a list of ponies in columns -# -# Licensed under WTFPL -# See COPYING for details - -# Author: Mattias Andrée, maandree@kth.se -# spider-mario - - -use strict; -use warnings; -use utf8; - -my %hash; - -{ - local @ARGV = @ARGV; - while ((my ($source, $target), @ARGV) = @ARGV) { - unless ($source eq $target) { - push @{$hash{$target}}, $source; - } - } -} - -while ((my ($source, $target), @ARGV) = @ARGV) { - if ($source eq $target) { - my @list = @{$hash{$source} // []}; - print $source; - print ' (', join(' ', @list), ')' if @list; - print "\n"; - } -} |