in reply to Checking for all cases of a word
The important thing is to realize when an approach is too inefficient to be of any use and abandon it in search of a better way. Your approach is 2^N where N represents the number of characters. While it is certainly possible to come up with every case variation (see this for both p5 and p6 examples), 536,870,912 checks for the longest word seem counter-productive. It isn't always easy to program efficient Perl efficiently - but it can be a fun distraction.
Cheers - L~R
|
|---|