In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jay) writes: >I have the following code snippet, designed to let my script accept >the ubiquitous "unambiguous abbreviations" in a configuration file. >The ultimate goal, for those who are interested, is to take the >abbreviated entries and generate a cononical bibTeX database file. >this is what I have so far to deal with the abbreviations. It works >perfectly well, but it seems like there should be a better way. > >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. >__CODE__ > > >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? -- Peter Scott http://www.perldebugged.com/ *** NEW *** http://www.perlmedic.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>