disabled
      ˆÂ‘äÇò 8à_R†WŸÏÁƒh¹À¿¾      0
      ˆÂ‘äÇò 8à_R†WŸÏÁƒh¹À¿¾      0
      ˆÂ‘äÇò 8à_R†XÝ¿ÏÁƒh¹À¿¾      0
  5   	ˆl–ßi~” T¾R( 	Å�Šã/)‹Fÿ�þB gáñ¾ûí�ùÂƒh¹ÁÀ¿      	       0        0        0        0        0        0        0        0        0        0        0        0        0        0        0        0        0
  W   ˆl–Ým_Jå7µ	@¿q§nJbÑ¿�þD	#Y²½+ÒH¼ãÀþÃƒy ‡Â_ˆI|¥�+V[(a–ßi~” T¾R( 	Å+€fàS�ÿÂ  Û    #!/usr/bin/perl -w

# 1998/12/10
# Added:        push @allwords, $fields[$x];   <carl@dpiwe.tas.gov.au>
# Replaced:     matching patterns. they match words starting or ending with ()[]'`;:?.,! now, not when in between!
# Gone:         the variable $line is gone (using $_ now)
#
# 1998/12/11
# Added:        catdoc test (is catdoc runnable?)    <carl@dpiwe.tas.gov.au>
# Changed:      push line semi-colomn wrong.         <carl@dpiwe.tas.gov.au>
# Changed:      matching works for end of lines now  <carl@dpiwe.tas.gov.au>
# Added:        option to rigorously delete all punctuation <carl@dpiwe.tas.gov.au>
#
# 1999/02/09
# Added:        option to delete all hyphens         <grdetil@scrc.umanitoba.ca>
# Added:        uses ps2ascii to handle PS files     <grdetil@scrc.umanitoba.ca>
# 1999/02/15
# Added:        check for some file formats          <Frank.Richter@hrz.tu-chemnitz.de>
# 1999/02/25
# Added:        uses pdftotext to handle PDF files   <grdetil@scrc.umanitoba.ca>
# Changed:      generates a head record with punct.  <grdetil@scrc.umanitoba.ca>
# 1999/03/01
# Added:        extra checks for file "wrappers"     <grdetil@scrc.umanitoba.ca>
#               & check for MS Word signature (no longer defaults to catdoc)
# 1999/03/05
# Changed:      rejoin hyphenated words across lines <grdetil@scrc.umanitoba.ca>
#               (in PDFs) & remove multiple punct. chars. between words (all)
# 1999/03/10
# Changed:      fix handling of minimum word length  <grdetil@scrc.umanitoba.ca>
#
# 1999/05/05
# Changed:	Adapted for Debian.		<jdassen@wi.leidenuniv.nl>
#               Fixed C-ism.
#               Check if converter is actually available.
#               Try multiple converter candidates.
#########################################

#
# MS Word to text converter
#
$CATDOC = "/usr/bin/catdoc";				# Package "catdoc"
if (! -x $CATDOC) { $CATDOC = "/usr/bin/word2x"; }	# Package "word2x"
if (! -x $CATDOC) { $CATDOC = "/bin/true"; }

#
# set this to your WordPerfect to text converter, or /bin/true if none
# available this nabs WP documents with .doc suffix, so catdoc doesn't see
# them
#
$CATWP = "/bin/true";	# No Debian package for this conversion.
if (! -x $CATDOC) { $CATWP = "/bin/true"; }

#
# set this to your RTF to text converter, or /bin/true if none available
# this nabs RTF documents with .doc suffix, so catdoc doesn't see them
#
$CATRTF = "/bin/true";	# No Debian package for this conversion.
if (! -x $CATRTF) { $CATRTF = "/bin/true"; }

#
# set this to your PostScript to text converter
#
# pstotext usually performs better than ps2ascii, and it supports Latin1.
$CATPS = "/usr/bin/pstotext";				# Package: pstotext
if (! -x $CATPS) { $CATPS = "/usr/bin/ps2ascii"; }	# From a ghostscript
if (! -x $CATPS) { $CATPS = "/bin/true"; }

#
# set this to your PDF to text converter
#
$CATPDF = "/usr/bin/pstotext";				# From "pstotext"
if (! -x $CATPDF) { $CATPDF = "/usr/bin/pdftotext"; }	# From "xpdf"/"xpdf-i"
if (! -x $CATPDF) { $CATPDF = "/usr/bin/ps2ascii"; }	# From a ghostscript
if (! -x $CATPDF) { $CATPDF = "/bin/true"; }

# need some var's
$minimum_word_length = 3;
$head = "";
@allwords = ();
@temp = ();
$x = 0;
@fields = ();
$calc = 0;
$dehyphenate = 0;
#
# okay. my programming style isn't that nice, but it works...

#for ($x=0; $x<@ARGV; $x++) {           # print out the args
#       print STDERR "$ARGV[$x]\n";
#}

# Read first bytes of file to check for file type (like file(1) does)
open(FILE, "< $ARGV[0]") || die "Oops. Can't open file $ARGV[0]: $!\n";
read FILE,$magic,8;
close FILE;

if ($magic =~ /^\0\n/) {                # possible MacBinary he