in reply to Fibonacci Generator
You could avoid those ugly ifs before every printout by saying
at the top of your program (see perlvar). Your prints then simply become print; or print $y;if ($opt_c) { $\ = "\n"; } else { $\ = " "; }
And two random remarks, you might be interested in this recent thread, also dealing with the Fibonacci series and I hope you developed your program using strict and warnings :)
-- Hofmator
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Fibonacci Generator
by sifukurt (Hermit) on Aug 10, 2001 at 19:50 UTC | |
by John M. Dlugosz (Monsignor) on Aug 11, 2001 at 07:16 UTC |