~ubuntu-branches/ubuntu/breezy/fortunes-es/breezy

« back to all changes in this revision

Viewing changes to extractall.pl

  • Committer: Bazaar Package Importer
  • Author(s): Javier Fernandez-Sanguino Pen~a
  • Date: 2005-04-24 01:52:04 UTC
  • mfrom: (1.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050424015204-ndov9cxtiho7l0jf
Tags: 1.24
Added feminist fortunes provided by Miriam Ruiz to the -off package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/perl
 
2
#
 
3
$line="";
 
4
while (<STDIN>) {
 
5
        chomp;
 
6
        s/^\s+//;
 
7
        s/\s+/ /;
 
8
        if (/^%/) {
 
9
                print $line."\n";
 
10
                $line="";
 
11
        } else {
 
12
                if ($line ne "") {
 
13
                        $line="$line $_";
 
14
                } else {
 
15
                        $line=$_;
 
16
                }
 
17
        }
 
18
}
 
19
exit 0;