in reply to What do you write when learning a new language?

I always write a simple mysql application that does a "select to_days(now()) - to_days('certain special date')" using bind vars if the language supports it -- which they all should by now I hope.

I then write a Fibonacci generator as close to this recursive formula as possible (ignoring the fact that there are better ways to do it):

use strict; for my $i (0 .. 35) { print "i=$i ... fib(i)=", fib($i), "\n"; } sub fib { my $n = shift; return fib($n-1) + fib($n-2) if $n>1; return 1; }

-Paul