<font size=1>Created with colorer-take5 library. Type '[b]perl[/b]'</font>
<span style='color:#800000; font-weight:bold; '>sub </span>fib<span style='color:#800080; '>{</span>
<span style='color:#800000; font-weight:bold; '>my</span> <span style='color:#808030; '>(</span>$x<span style='color:#808030; '>,</span> $y<span style='color:#808030; '>)</span> <span style='color:#808030; '>=</span> @_<span style='color:#800080; '>;</span>
<span style='color:#800000; font-weight:bold; '>unless</span> <span style='color:#808030; '>(</span>$y<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
$y <span style='color:#808030; '>=</span> <span style='color:#808030; '>[</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>]</span><span style='color:#800080; '>;</span>
$x <span style='color:#808030; '>-</span><span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>scalar</span><span style='color:#808030; '>(</span>@<span style='color:#800080; '>{</span>$y<span style='color:#800080; '>}</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span>
<span style='color:#800000; font-weight:bold; '>if</span> <span style='color:#808030; '>(</span>$x<span style='color:#808030; '>-</span><span style='color:#808030; '>-</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
<span style='color:#800000; font-weight:bold; '>my</span> $z <span style='color:#808030; '>=</span> $y<span style='color:#808030; '>-></span><span style='color:#808030; '>[</span><span style='color:#808030; '>-</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>]</span> <span style='color:#808030; '>+</span> $y<span style='color:#808030; '>-></span><span style='color:#808030; '>[</span><span style='color:#808030; '>-</span><span style='color:#008c00; '>2</span><span style='color:#808030; '>]</span><span style='color:#800080; '>;</span>
<span style='color:#800000; font-weight:bold; '>push</span> @<span style='color:#800080; '>{</span>$y<span style='color:#800080; '>}</span><span style='color:#808030; '>,</span> $z<span style='color:#800080; '>;</span>
@_ <span style='color:#808030; '>=</span> <span style='color:#808030; '>(</span>$x<span style='color:#808030; '>,</span> $y<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
<span style='color:#7f9fbf; font-weight:bold; '>goto</span> <span style='color:#808030; '>&</span>fib<span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span> <span style='color:#800000; font-weight:bold; '>else</span> <span style='color:#800080; '>{</span>
<span style='color:#800000; font-weight:bold; '>return</span> <span style='color:#800000; font-weight:bold; '>wantarray</span><span style='color:#808030; '>?</span>@<span style='color:#800080; '>{</span>$y<span style='color:#800080; '>}</span><span style='color:#808030; '>:</span>$y<span style='color:#808030; '>-></span><span style='color:#808030; '>[</span><span style='color:#808030; '>-</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>]</span><span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
<span style='color:#800000; font-weight:bold; '>print</span> <span style='color:#800000; font-weight:bold; '>scalar</span><span style='color:#808030; '>(</span>fib<span style='color:#808030; '>(</span><span style='color:#008c00; '>41</span><span style='color:#808030; '>)</span><span style='color:#808030; '>)</span>