#!/usr/bin/perl -s
$htmlview = $ENV{'HTMLVIEW'} || 'webrowse -s';
# tdiff - word-level diff on two files with HTML output
# Steve Kinzler, kinzler@cs.indiana.edu, Dec 10
# http://www.cs.indiana.edu/~kinzler/home.html#unix
die "usage: $0 [ -s ] [ -o ] file1 file2
-s arguments are strings to diff, not filenames
-o output HTML directly, not with `$htmlview`\n" if $h;
use Text::ParagraphDiff; # buggy?
open(STDOUT, "| $htmlview") || die "$0: cannot pipe to $htmlview ($!)\n"
unless $o;
print text_diff($ARGV[0], $ARGV[1], $s ? { string => 1 } : ());