in reply to Re^2: Getting matched word from String::Approx
in thread Getting matched word from String::Approx
If the list is huge, would it be very slow?
Quite possibly. There’s a discussion in String::Approx#CONTROLLING-THE-CACHE about the tradeoffs between memory and running time.
If we just wanted to get the first match from @list and return the result, is there a way to do that?
From the documentation, this doesn’t seem to be possible, no. :-( When called in scalar context, the amatch function returns a single value, but that value is just true or false to indicate whether or not any matches were found.
Note: Before committing to this module, you should read String::Approx#DESCRIPTION carefully and consider the alternatives. Depending on your requirements, a module such as Text::Levenshtein might suit you better.
Hope that helps,
|Replies are listed 'Best First'.|
Re^4: Getting matched word from String::Approx
by Anonymous Monk on Dec 30, 2015 at 16:17 UTC