Leser: 1
9 Einträge, 1 Seite |
1
2
C:\Renee>perl -Mwarnings -le "my $var = 'test123'; print 'no' unless($var =~ /^\d+$/);"
no
1
2
3
4
tina@lugosi:~/server$ perl -wle'
my $var = 23;
print "gleich" if $var == "2"'
tina@lugosi:~/server$
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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; }
9 Einträge, 1 Seite |