in reply to Pattern matching

Ah. I think I see your problem. Excessive use of white space. In fact, total lack of code whatsoever.

In case you didn't realize it from the replies to your previous questions, Perlmonks is not a homework service. While we are more than happy to help with any questions you may have, in general, we take a dim view of you asking us to do your homework for you, especially when you don't seem to have made any attempt to solve it on your own first.