#!/usr/bin/perl use Data::Dumper; open(FILE,"<xpm-pic"); $row=-1;$col=-1; while (<FILE>) { chomp; $row++; $col=-1; foreach $char (split //) { $col++;$pix[$row][$col]=$char; } } print Dumper(\@pix);
In reply to Re: How can I cleanly split a string of text into a two-dimensional array
by da w00t
in thread How can I cleanly split a string of text into a two-dimensional array
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |