(untested)my $data = "whatever"; my @pixels = [][]; for (my $i = 1; $i < $height; $i++) { (@pixels[$i][1 .. $width], $data) = split('', $data, $width); }
In reply to Re: How can I cleanly split a string of text into a two-dimensional array
by chromatic
in thread How can I cleanly split a string of text into a two-dimensional array
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |