Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: (Golf) Strings-to-Array

by MeowChow (Vicar)
on Mar 30, 2001 at 07:42 UTC ( #68269=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://68269]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2016-12-03 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (52 votes). Check out past polls.