On Fri, 04 Feb 2005 07:31:09 -0800 (PST), Peter Scott <[EMAIL PROTECTED]> wrote:
> >I've looked into Text::Abbrev, but there is no way to distigush > >between strings that fail to match and strings that match amiguously. > > But Text::Abbrev will form a list containing *only* strings that > are unambiguous. > Right. Which does not give me the option of letting me give the user that chance to recover ambiguous matches, unless I just give them the list of all possible types. That's certainly an option. > >my $category ; > > > >my @bibcats = qw/author authors editor series_editor/ ; > > The problem is in your specification. If you have two > words, the first of which is a prefix of the second, > how could a user input ever unambiguously match the > first one? It can't. That's why it is so important to be able to resolve ambiguous matches from a list of likely candidates, rather than simply having them fail. There is a serious logical flaw, here, though: for some reason, I seem to have assumed that the abbreviations would simply be some subset of the string in order. "aus", though, should be a valid abbv. for "authors," and "sed" may be the most obvious choice for "series_editor." Text::Abbv with a list of all options on failure is looking better all the time. Thanks, --jay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>