in reply to Checking for all cases of a word

MonkPaul,
As you can see, the language offers easier ways to do this. In addition to using the /i modifier to the regex, other techniques involve making a copy in all 1 case using uc or lc.

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