aboutsummaryrefslogtreecommitdiff
path: root/pq4ps.pl
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-01 00:19:34 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-01 00:19:34 +0200
commite5b783e52858ae73d26c21464952323b9e3f320a (patch)
tree705e75e0e7a996cd962e3657ab45d8cccfdebac6 /pq4ps.pl
parentccd12be1ebe10bbeb471c132a53c0b576a9dfa42 (diff)
downloadponysay-e5b783e52858ae73d26c21464952323b9e3f320a.tar.gz
ponysay-e5b783e52858ae73d26c21464952323b9e3f320a.tar.bz2
ponysay-e5b783e52858ae73d26c21464952323b9e3f320a.zip
partial merge of quotes into main
Diffstat (limited to 'pq4ps.pl')
-rwxr-xr-xpq4ps.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/pq4ps.pl b/pq4ps.pl
new file mode 100755
index 0000000..a10c998
--- /dev/null
+++ b/pq4ps.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+opendir(DIR, "/usr/share/ponysay/ponies/");
+@files = readdir(DIR);
+
+opendir(DIR, "/usr/share/ponysay/quotes/");
+@quotes = readdir(DIR);
+
+
+foreach $file (@files)
+{
+ $_ = $file;
+ $_ =~ s/\.pony$//g;
+ $f = $_;
+ if (! /^\./)
+ { foreach $quote (@quotes)
+ {
+ $_ = $quote;
+ $_ =~ s/\.\d+//g;
+ $_ = '+'.$_.'+';
+ if (! /^\./)
+ { if (/\+$f\+/)
+ { print $f."@".$quote."\n";
+ } }
+ } }
+}