in reply to Re: Find common prefix from a list of strings (tye)
in thread Find common prefix from a list of strings
Nice solution; ++tye.
Changing
to$len= length( ( $dif =~ /^(\0+)/ )[0] );
will make it run quiet under warnings when the common prefix is the empty string.$len= length( ( $dif =~ /^(\0+)/ )[0] || '' );
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Find common prefix from a list of strings (*)
by tye (Sage) on Jul 14, 2003 at 20:48 UTC |