sub berechne_binom_reihe{ use bigint; my $length = shift; return [] unless $length =~ /^[+]?\d+$/ and $length > 0; my @content = (1); my ($mid, $m2); for my $row (2 .. $length){ $mid = $row - 1 >> 1; $r2 = $row - 2; $content[$_ - 1] += $content[$_] for 1 .. $mid; $content[$r2 - $_] = $content[$_ - 1] for 1 .. $mid; unshift @content, 1; } return \@content; }