From e5b783e52858ae73d26c21464952323b9e3f320a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 1 Aug 2012 00:19:34 +0200 Subject: partial merge of quotes into main --- pq4ps.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 pq4ps.pl (limited to 'pq4ps.pl') 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"; + } } + } } +} -- cgit