I searched a long time for a solution for my problem but I didn't find the right thing.
I have to read from a file (content is "abngjm" without any other signs) and have to write this content in an array. But every sign has to be called by its own index. If I use "open file" and "print @array = FILE" I can write the signs only in correlation to one index ("$array[0]").
You should really do your own school work, but since you seem to have tried something I'll help you.
open(FILE,'path/to/your/file') or die "$!";
my $line = <FILE>;#because it is one line you read it into a scalar
close FILE;
my @array = split(//, $line);
foreach my $i (0..$#array) {
print "$array[$i]\n";
}
I know my solution works. I read your question, I understood your question, I tested my code, then I posted a reply. The other guy simply did not understand the question, we are all guilty of that at times.