x=i=1;p x+=i=x-i while+1
2006-11-17 Retitled by Arunbear, as per Monastery guidelines Original title: 'Fibonacci numbers - final shot - 24 chars'
Meh, if you don't have to use perl, you can do much better:
Re: Fibonacci numbers (again).
Update: let's put them under each other to see which one is longer.
1 2 3
ruby -e'x=i=1;p x+=i=x-i while+1'
It's also easy to shorten the ruby version by two characters
That's 33, not 24 (since omitting the first line gives a compile error).
If you want really small, try 4!
I'm sure f can be made way smaller than ruby.
Update: Downsized from 10
ruby -e 'x=i=1;p x+=i=x-i while+1'
While your first post ran in Perl, this one doesn't.
syntax error at 584097.pl line 1, near "ruby -e "
Execution of 584097.pl aborted due to compilation errors.
1. Keep it simple
2. Just remember to pull out 3 in the morning
3. A good puzzle will wake me up
Many. I like to torture myself
0. Socks just get in the way
Results (289 votes). Check out past polls.