Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
And that works great, when there are 10 UPPERCASE in a row, but not when there is any lowercase or brackets separating them. Then I tried some cocamamie bit where I was counting and incrementing after every instance of an uppercase, but I wound up trying to write to $1, which I know is read only. Can anyone enlighten me on a way to accomplish this? Thanks, Matt - -- Matt Dunn - mdunn@stwing.org http://www.stwing.org/~mdunn/@space = #some array of long text strings; $n = () = @space; $i = 0; while ($i < $n) { $space[$i] =~ s/([A-Z]{10}?)/$1 .' '/gxe; $i++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inserting characters into strings
by BrowserUk (Patriarch) on Jun 01, 2004 at 14:22 UTC | |
|
Re: Inserting characters into strings
by borisz (Canon) on Jun 01, 2004 at 14:05 UTC | |
by Anonymous Monk on Jun 01, 2004 at 14:57 UTC |