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


in reply to (Golf) Strings-to-Array

# 33 chars sub s2a{map{$l[-1+pos].=$&while/./g}@_;@l}
... or 38 chars, if you want to throw in my@l;
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re: Re: (Golf) Strings-to-Array
by japhy (Canon) on Mar 30, 2001 at 07:48 UTC
    Add 6 chars. 5 for my@l; and one for the s modifier on your regex. 39 looks like the score to beat.

    japhy -- Perl and Regex Hacker