in reply to Fibonacci Generator
I was going through the "miscellaneous nodes" section
and found this one of many to be interesting.
So... I thought I would do a little digging and sure
enough, consistent with one of the many glories of
Perl (there is a module for just about everything),
I found one, on CPAN, that generates Fibonacci numbers
and related things.
This is the CPAN documentation URL:
http://search.cpan.org/author/VIPUL/Math-Fibonacci-1.5/lib/Math/Fibonacci.pm
And here is a little chunk of code, (all of 5 lines), which generates a 10 number Fibonacci Series:
The wonders of Perl!
This is the CPAN documentation URL:
http://search.cpan.org/author/VIPUL/Math-Fibonacci-1.5/lib/Math/Fibonacci.pm
And here is a little chunk of code, (all of 5 lines), which generates a 10 number Fibonacci Series:
#!/usr/bin/perl -w use strict; use Math::Fibonacci qw(series); my @fibonacci=series(10); print "@fibonacci\n";
The wonders of Perl!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Fibonacci Generator
by Anonymous Monk on May 26, 2007 at 10:02 UTC | |
by blazar (Canon) on May 26, 2007 at 13:05 UTC | |
Re^2: Fibonacci Generator
by Anonymous Monk on Dec 06, 2009 at 03:48 UTC |
In Section
Code Catacombs