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
In reply to Re: Fibonacci Generator
by Hofmator
in thread Fibonacci Generator
by sifukurt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |