sub popfileb { #set first row; substr $aox[0], 0, 11, 'n' x 11; foreach my $yb ( 1 .. 10 ) { foreach my $xb ( 0 .. 10 ) { #set increasing rows; substr $aox[$yb], $xb, 1, 'a'; } $aod[$yb] = $aox[$yb] . "\n"; } }