I got it - at least it's stopped throwing warnings and it's a whole lot faster that what I had before.
Since popnum3 is called from inside an if/else
else {
my $pos = -1;
push @cPosns, $pos while ($pos = index($zazb, 'c', $pos+1)) >= 0;
my $offset = $cPosns[rand @cPosns];
$cell = sprintf '%.2f', popnum3( $x, $y, $copycop, $offset, );
}
then
sub popnum3 {
my ( $x, $y, $z, $offset ) = @_;
if ( $y == 0 ) {
$aob[$x][0] = $initial * ( 1 + $z );
}
else {
while (1) {
$aob[$x][$y] = $aob[$offset][ $y - 1 ] * ( 1 + $z );
last;
}
}
return $aob[$x][$y];
}
So far it's looking good. Thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.