in reply to 30 Spaces- 1 question
or, if you want the first 30 words as a single try you can:@first_thirty[0..29] = split " ", $string;
...which doesn't avoid the split/join thing, but by specifying an array slice you might avoid the memory hit of splitting the entire string when all you want is the first 30 words.$first_thirty = join " ", (split " ", $string)[0..29];
Gary Blackburn
Trained Killer
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: 30 Spaces- 1 question
by extremely (Priest) on Oct 09, 2000 at 09:58 UTC |