Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: (Golf) Strings-to-Array

by tye (Sage)
on Mar 29, 2001 at 02:34 UTC ( #67985=note: print w/replies, xml ) Need Help??


in reply to (Golf) Strings-to-Array

If you allow me my favorite tool, then I can do it in 31 characters and I don't need to use the awful $& and I don't require that the strings be the same length:

use mapcar; sub s2a{mapcar{join"",@_}map[/(.)/g],@_}

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-02-20 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (302 votes). Check out past polls.