http://qs1969.pair.com?node_id=103904


in reply to Fibonacci Generator

You could avoid those ugly ifs before every printout by saying

if ($opt_c) { $\ = "\n"; } else { $\ = " "; }
at the top of your program (see perlvar). Your prints then simply become print; or print $y;

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