http://www.perlmonks.org?node_id=801379

perl -le'$;=3;$;=~s/./$&?30:3/eg for 3..pop;print length$;' 12
Replace command-line argument 12 with any positive integer N to get the Nth Fibonacci number. Starts getting pretty slow for me after N=30, by the nature of the algorithm.

Can you see how it works?

blokhead