in reply to Recovering Substrings to String with Gap
my $after = 0; foreach my $sbstr ( @$array ) { my $pos = index $str, $sbstr, $after; substr ($nstring, $pos, length ($sbstr)) = $sbstr; $after=$pos+length($sbstr); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Recovering Substrings to String with Gap
by monkfan (Curate) on Apr 16, 2005 at 11:14 UTC | |
by salva (Canon) on Apr 16, 2005 at 12:03 UTC |