in reply to
I don't mean to come down on you if this is a genuine
problem you are having. However, there have been many
questions posted recently like the one asked above, all
posted by Anonymous Monk that just scream
I can find no practical purpose to the problem presented
above. If this is a genuine problem and not homework,
can you please explain the context of the problem?
From now on I will not answer any question that I suspect
is CS101 homework and is posted by Anonymous Monk.
I hope others will follow my lead.
I believe the purpose of Perlmonks is to enlighten the
and not to do someone's homework for them.