|Perl: the Markov chain saw|
Re: Re: Reusing camel codeby gmax (Abbot)
|on Dec 03, 2001 at 15:19 UTC||Need Help??|
Thank you very much for your hints. I tested your code
But I got an odd output. Split gives back some empty items
Changing split to match only /[SF]/ (your update suggestion) and adding a shift afterwards improves the output,
leaving me with the second problem, i.e. that having an odd number of items in my array, splice(@,0,2) will give back an undefined second element.
Nothing catastrophic, but it is going to increase the number of necessary checks.
Even if it doesn't do what I need, though, this code of yours gives me some ideas that I can further develop.
As for the second hint:
yes, it looks much faster (not to mention smarter) than my code.