in reply to recursive split
Split does not modify the original scalar; it returns a list. If you want to split the elements of that list, you need to split each of the elements and then collect those mini lists into a bigger list.
Write yourself a subroutine that takes a list, splits each of the things in that list, and pushes the results into a big list to return.
You can then call that sub as many times as you like without having to use recursion (starting with a list of 1 items, your original string).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: recursive split
by newbio (Beadle) on Sep 03, 2009 at 17:57 UTC | |
by SuicideJunkie (Vicar) on Sep 03, 2009 at 19:07 UTC |