#!/usr/bin/perl use Data::Dumper; while () { my $i=0; for $c (/./g) { push (@{$array[$i++]}, $c); } } print Dumper(\@array); __DATA__ ABC DBC ECC