installed_progs.t: Python checks stdout too, 150 ok
[sunny256-utils.git] / filter_ep
blob7a04e9e36019334070c8a300b3361e518c38633c
1 #!/usr/bin/env perl
3 #=======================================================================
4 # filter_ep
5 # File ID: ce8d78f4-5d39-11df-aedd-90e6ba3022ac
6 # Slipper bare ting som ser ut som en gyldig ep igjennom. For å ta så
7 # mye drit som mulig, slipper den bare gjennom 9-sifrede nummer som
8 # begynner på 9, og 10-sifrede nummer som begynner på 1. -v skriver ut
9 # ulovlige linjer.
11 # Character set: UTF-8
12 # License: GNU General Public License versjon 2 eller nyere.
13 # ©opyleft 2003–2004 Øyvind A. Holm <sunny@sunbase.org>
14 #=======================================================================
16 use strict;
17 use warnings;
19 $| = 1;
21 while (<>) {
22 chomp;
23 if (/\b(9\d{8})\b/ || /\b(1\d{9})\b/) {
24 print("$1\n");
28 __END__
30 =pod
32 =head1 LICENCE
34 This program is free software; you can redistribute it and/or modify it
35 under the terms of the GNU General Public License as published by the
36 Free Software Foundation; either version 2 of the License, or (at your
37 option) any later version.
39 This program is distributed in the hope that it will be useful, but
40 WITHOUT ANY WARRANTY; without even the implied warranty of
41 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
42 See the GNU General Public License for more details.
44 You should have received a copy of the GNU General Public License along
45 with this program; if not, write to the Free Software Foundation, Inc.,
46 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
48 =cut
50 # vim: set fileencoding=UTF-8 filetype=perl foldmethod=marker foldlevel=0 :
51 # End of file filter_ep