I'm not sure what the legal status of refer is. While at the Labs, I compiled refer under APE and it worked without too much fuss. I changed some path names to fit Plan 9 better and I'm sure I had to fix bugs that caused refer to break, since it is Mike Lesk code (see also uucp, tbl).