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

$~=$^=1;s//1 1 /;_:$~^=$^ ^=$~^=$^;$_.=($~=$~+$^." ");($~<99)?goto _:print

Replies are listed 'Best First'.
Re: Fibonacci Sequence
by tobyink (Canon) on Feb 27, 2013 at 08:41 UTC

    Perhaps not especially obscure, but:

    $"++,grep{$.=$"+$^,print$.,$/;$^=$",$"=$.}$[..0x10

    Update: A variation, less obfuscated, but more golfy if you have a vaguely modern version of Perl...

    # 1 2 3 # 12345678901234567890123456789012345678 perl -E'$a=1;map{$.=$a+$b;$b=$a;say$a=$.}0..71'
    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
      Today I learned, $/ :D

        Still not as short as yours but here is mine revised:

        $~=$^++;_:$~^=$^ ^=$~^=$^;$_.=($~=$~+$^.$/);($~<$$)?goto _:print

      Loopy short version:

      for(++$\;$/<$$;$/=($\+=$/)-$/){print $"}

      Now can someone find a similar short expression for oeis.org/A000040 please?

        $"++;_:while(++$"){$"%$_||next(_)for 2..$"-1;print$",$/}

        Update: trizen has pointed out that this is more efficient:

        $"++;_:while(++$"){$"%$_||next(_)for 2..sqrt$";print$",$/}

        ... but I don't like the two extra keystrokes required. Meanwhile, this solution gives you a minor efficiency boost without any extra nasty keystroke things...

        $"++;_:while(++$"){$"%$_||next(_)for 2..$"/2;print$",$/}
        package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: Fibonacci Sequence
by perlaintdead (Scribe) on Mar 28, 2013 at 23:42 UTC

    did this one when i was first starting to OBFU.

    my($a,$b,$c,$r);($a,$b,$c)=f();sub t{$r=caller if eval{ord(71)};};loca +l $d="\xAA\x79\x53\x54\x44\x4f\x55\x54";"\xAA\x79"=~m/\xAA\x79/; t($&);my @z=('0','5','6','4',rand(10),'0','','3','8','4');$d=~s///;for +($i=$z[int(4+(.714287*7))];$i<125;$i=$i+5){$c=$a+=$b;$a=$b;$b=$c;__(" +\x0A");} sub __{$xz=pop;syswrite $d,"$c$xz"};sub f{return("\x30"+("\x31")*(((1- +1)+1)/(1*1)-1)-(int(48*0.020833333))), $b=(int(((ord " ")+1)*("0.0434782" ))),$c="\x5C\x78".(4+("\x2D". 1)).( +0),,,,,,,,,,,,,};