in reply to reading input into a number of arrays

Strictly speaking, Perl does not support multidimensional arrays. There are at least two ways that they can be simulated. tobyink has demonstrated the hash method documented in perldata. The other is documented in the "Arrays of Arrays" section of perldsc. The first has the advantage that the source code looks more the way we expect. The other, works the way we come to expect Perl to work. Here is a solution to your problem using slices (only available in the second method ref perldata).
use strict; use warnings; my $infile = \do{my $chars = "1111111\n2222222\n3333333\n"}; open my $FH, '<', $infile or die "Cannot open input"; my @a; for my $i (1..3) { my $ingang = <$FH>; chomp $ingang; $a[$i] = [undef, split //, $ingang]; } for my $p (1..3) { print @{$a[$p]}[1..7], "\n"; }
OUTPUT: 1111111 2222222 3333333
Bill