Quote:
Originally Posted by Dharrk
Thank you for the response Ghanja. I was told elsif would help to prevent memory leaks which is why I use them constantly; I have been scripting for may be 2 months. I will look into the perl regular expressions and see if I cannot clean the script up somewhat.
|
It was nothing against your efforts, rather, the expanding or widening of the site forums itself (something Akka did a year or so ago). I really must ask what browser he uses, so that I no longer have to scroll horizontally.
"if" is a conditional, and as such will be checked each time
"elsif" is also a conditional that if the originating if was not true, will be checked/considered, stopping upon the first met condition of that if/elsif nesting.
The use of them is a bit much, yes, though the problem was in your regex, not the large number of elsif's. Krab has provided a hash / iteration method, also using length, substr, new regex operator, etc. Plenty to digest, but, beneficial as you'll hopefully learn from it.