Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: (Golf) Strings-to-Array

by tye (Cardinal)
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")


Comment on Re: (Golf) Strings-to-Array
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://67985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-08-30 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls