note
Athanasius
<p>Hello [cisco88], and welcome to the Monastery!</p>
<p>In addition to the excellent points made by [Corion]...</p>
<p>It’s always a good idea to:</p>
<code>
use strict;
use warnings;
</code>
<p>in any Perl script. For one-liners, you can do:</p>
<code>
perl -Mstrict -we ...
</code>
<p>to get the same benefit. In this case, [doc://warnings] would have given you messages of the form:</p>
<code>
Use of uninitialized value in print...
</code>
<p>which arise because the expression <c>rand($len) % $len + 3</c> sometimes generates array indexes beyond the end of the <c>@lett</c> array.</p>
<p>Get in the habit of <i>always</i> using <c>strict</c> and <c>warnings</c> now, and you will save yourself a lot of time and grief in the future!</p>
<p>Hope that helps,</p>
<div class="pmsig"><div class="pmsig-968231">
<p>
<table width="100%">
<tr>
<td align="left">
Athanasius <font color="#008000"><</font>[href://http://www.biblegateway.com/passage/?search=John%203:16&version=NLV|<font color="#008000">°</font>]<font color="#008000">(((><</font> <i>contra mundum</i>
</td>
<td align="right">
[href://http://translate.google.com.au/#la/en/Iustus%20alius%20egestas%20vitae%2C%20eros%20Piratica%2C|<b>Iustus alius egestas vitae, eros Piratica,</b>]
</td>
</tr>
</table>
</p>
</div></div>
1014922
1014922