Since addition treats undef as 0, and that is what you, just switch off the warning:
for($i=1;$i<=$k;$i++){ $j = $i - 1; no warnings 'uninitialized'; $b[$i] = $a[$i] + $a[$j]; }
In reply to Re: problem in my sub partition
by moritz
in thread problem in my sub partition
by PhillipHuang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |