in reply to Re: An efficient way to gather a common portion of several strings' beginnings
in thread An efficient way to gather a common portion of several strings' beginnings
The m[(^\0+)] match results in an undefined value for $mask when there is no common base substring at all, which then hiccups a "Use of uninitialized..." warning in the substr expression (if warnings are enabled). Happily, this is easily fixed by using m[(^\0*)] instead!
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: An efficient way to gather a common portion of several strings' beginnings
by BrowserUk (Patriarch) on Nov 15, 2015 at 17:38 UTC |