Write a method to generate the Fibonacci series
Anonimo
perl: fibonacci(10); sub fibonacci{ my $n = shift; my $prev =0; my $this =1; my $count=0; print "$prev\n"; while($count<$n){ print "$this\n"; my $next = $this + $prev; $prev = $this; $this = $next; $count++; } }