File size: 218 Bytes
158b61b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env perl

# strip text file of any XML markup

binmode(STDIN, ":utf8");
binmode(STDOUT, ":utf8");

use strict;

while(<STDIN>) {
  s/<\S[^>]*>/ /g;
  chomp;
  s/ +/ /g;
  s/^ //;
  print $_;
  print "\n";
}