#!/usr/bin/perl -w

#=========================================================
# $Id: strip_english 11597 2004-10-23 17:00:08Z sunny256 $
# Removes the English text from stdin or files.
#
# This complicated piece of software is licensed under the
# GNU General Public License.
#=========================================================

use strict;

$| = 1;

use Getopt::Std;
our ($opt_h) = (0);
getopts('h') || die("Option error. Use -h for help.\n");

$opt_h && usage(0);

my $Data = join("", <>);
$Data =~ s/\n *?<!-- \@ENGLISH {{{.*?\@ENGLISH }}} -->\s*?\n/\n/gs;
print($Data);

sub usage {
    my $Retval = shift;
    print(<<END);

Usage: $0 [file [...]]

Strips the \@ENGLISH markers and all text inside from stdin or files 
specified on the command line. All output goes to stdout.

END
    exit($Retval);
}

__END__

# vim: set et ts=4 sw=4 sts=4 fenc=UTF-8 fo+=w ft=perl :
# End of file $Id: strip_english 11597 2004-10-23 17:00:08Z sunny256 $
