in reply to Re: (Golf) ranging on alphabet
in thread (Golf) ranging on alphabet


We can rework that slightly to remove characters, i count 136 with the same functionality (please tell me if my testing missed something :)
#23456789012345678901234567890123456789012345678 $b=join'',@{+pop};@_=@{+pop};$a={map{$_[$_],$_ [$_+1]}0..@_-2};$_=join',',grep$b=~s/\Q$_//g, @_;s/(.)(?:,((??{"\Q$$a{$+}"})))+/$1..$+/g;$_
Put a print instead of a $_ for that last bit and it's 139 characters...

jynx

Replies are listed 'Best First'.
Re: Re: Re: (Golf) ranging on alphabet
by flgr (Sexton) on Sep 27, 2001 at 17:17 UTC
    This one is 127 chars. I hope it still works - if not correct me. :)
    #23456789012345678901234567890123456789012345678 $b=join'',@_={+pop};$a={map{$_[$_],$_[$_+1]}0.. @_-2};$_=join',',grep$b=~s/\Q$_//g,@_;s/(.)(?:,( (??{"\Q$$a{$+}"})))+/$1..$+/g;$_


    $§=lc(sub{}^" \6 \n");$§=~s/\(.*\)//;for(split
    ('',$§)){$/=$_;for(5..7){$/++}$:.=$/}print$:;1
      Sorry... when I ran this against the test I got back a hashref... The other 2 seem to work, though...

                      - Ant
                      - Some of my best work - Fish Dinner