in reply to problems splitting string
What I was thinking would be to have a look ahead for a number.
my $string = '1 Cat 2 Dogs 3 Hamsters'; my @animals = split /(?=\d)/, $string;
-Bryan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: problems splitting string
by VSarkiss (Monsignor) on Dec 15, 2005 at 16:08 UTC | |
by mrborisguy (Hermit) on Dec 15, 2005 at 16:11 UTC |