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


in reply to Re: Fibonacci Generator
in thread Fibonacci Generator

Ooooo, I like that. Hadn't even thought of doing it that way. I'm updating the posted code using your suggestion.

I think I developed using strict and whatnot. I almost always do unless it is only going to be a two- or three-liner. Sometimes I still unconsciously rebel against my COBOL days and forget to use strict, but that happens far less often than it used to.
___________________
Kurt

Replies are listed 'Best First'.
Re: Re: Re: Fibonacci Generator
by John M. Dlugosz (Monsignor) on Aug 11, 2001 at 07:16 UTC
    if ($opt_c) { $\ = "\n"; } else { $\ = " "; }
    You can avoid that ugly if/else and excess braces by writing:
    $/= $opt_c ? "\n" : " ";