Perl: the Markov chain saw | |
PerlMonks |
Re: Testing a string for a range of charactersby Fastolfe (Vicar) |
on Jan 24, 2001 at 20:10 UTC ( [id://54013]=note: print w/replies, xml ) | Need Help?? |
It might also pay to ask yourself, "How many times will this test be repeated?" If it's just once, I might suggest that you move your hash creation into your benchmark test, as I suspect the expense involved in the construction of the hash will make the other methods a bit more appealing. If your test will be repeated dozens or more times on the same range, a hash is clearly the better way to approach it.
In Section
Seekers of Perl Wisdom
|
|