my $line = 0; while () { my @linesplit = split //, $_; my $i = 0; for my $column (@linesplit) { $list->{$line}->{$i}= $column; $i++ } $line++; } #### ----------------------------------- --the good, the bad and the physi-- -----------------------------------