in reply to Re: Golfing a fibonacci number generator
in thread Golfing a fibonacci number generator

Yes, that's right and in realtion to this I posted an year ago the same one-liner but 27 chars long (the shortest one in the world):
print$}+=$.=$}-$.||1while.1
Re: Fibonacci numbers (again)


Replies are listed 'Best First'.
Re^3: Golfing a fibonacci number generator
by cLive ;-) (Prior) on Nov 04, 2006 at 18:35 UTC
    Doesn't work - at least not for me. My best stab is 39 chars (which I'm sure can be improved):
    ($x,$y)=($y,$x+$y),print$y for$x++..19
      Yes, it works just fine (blame only yourself for your errors):
      perl -e 'print$}+=$.=$}-$.||1while.1' 1235813213455891442333776109871597258441816765109461771128657463687... +...... # and so on...


        You're missing a 1 at the beginning.