Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How can I cleanly split a string of text into a two-dimensional array

by chromatic (Archbishop)
on Apr 01, 2000 at 10:58 UTC ( #6657=note: print w/ replies, xml ) Need Help??


in reply to How can I cleanly split a string of text into a two-dimensional array

How about:

my $data = "whatever"; my @pixels = [][]; for (my $i = 1; $i < $height; $i++) { (@pixels[$i][1 .. $width], $data) = split('', $data, $width); }
(untested)


Comment on Re: How can I cleanly split a string of text into a two-dimensional array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-09-19 01:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls