monkdiscuss
mirod
<p>Would something like this be useful, maybe in the FAQ?</p>
<p>Your question seems to be a homework assignment:<p>
<ul><li>answering it requires very little Perl knowledge, using perldoc
(the documentation that comes with every Perl installation) or
reading any Perl book would give you the answer faster than asking
this community</p>
<li>the problem you are describing does not seem to be a real-life
one but more something a teacher would write</li>
</ul>
<p>Answering homework is not something that Perl Monks often do. It would cheat
you of a chance to learn, your teacher of a chance to teach and evaluate
you, and your fellow students of chance to be fairly compared to you.</p>
<p>
<p>Plus you should be aware that your teacher might also be reading your
post, and the answers, and might identify you. Many schools penalties for
cheating include expulsion.</p>
<p>So if your problem is a real one please post some more explanation about
it, and you will get help here. Otherwise type <tt>perldoc perldoc</tt> or
<tt>man perldoc</tt>
if you are on a Unix system, use the Perl Help if you are using the
Activestate port on a Windows machine, or grab a Perl Book, [Learning Perl],
[id://36169|Programming Perl] or <a href="http://slashdot.org/books/00/01/24/1156247.shtml">
Elements of Programming with Perl</a> are probably adequate for you.</p>