in reply to Populating a vector
shorter?Do you see something else/shorter/better ?my @poly_coeffs = (0) x ($n + 1) ; $poly_coeffs[0]++ ;
better? (and even shorter)my @poly_coeffs = map !$_+0, 0..$n;
but I just had to include a map based solution... ;-)my @poly_coeffs = (1, (0) x $n);
|
|---|