#!./perl BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } print "1..3\n"; $DICT = <dict-$$") or die "Can't create dict-$$: $!"; unlink "dict-$$"; print DICT $DICT; my $pos = look *DICT, "abash"; chomp($word = ); print "not " if $pos < 0 || $word ne "abash"; print "ok 1\n"; $pos = look *DICT, "foo"; chomp($word = ); print "not " if $pos != length($DICT); # will search to end of file print "ok 2\n"; $pos = look *DICT, "aarhus", 1, 1; chomp($word = ); print "not " if $pos < 0 || $word ne "Aarhus"; print "ok 3\n";