$#array = $i;
should be
$#array = $i - 1;
because the $i subscript has been post-incremented ready to receive the next value in the ... while <$in>; loop. I don't think you can get 32768 unique values when generating them with ... int rand 32767 ....
Cheers,
JohnGG
In reply to Re^2: Saving an array to a disk file
by johngg
in thread Saving an array to a disk file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |