in reply to Splitting each line into an array from file

I wrote this short thing below for you to further expand on toolic's post. turn CHOMP on and off and you will see what that does. Perl can processes lines character by character, but that is in practice seldom used because regex (regular expressions) are a built-in part of the language. You have an answer to your explicit question, but perhaps if you back up and explain what you are trying to accomplish, you might get a better solution to the overall problem.
#!/usr/bin/perl -w use strict; print "Program Running\n"; # Below, I use the standard already opened DATA handle # instead of your open() # open FILE, "<", "Readme.txt" or die $! ; # the "=" stuff is a trick using a markup language # called perldoc to add text within the code so here # that the comment text doesn't get confused with the DATA. use constant CHOMP => 0; #change to 1 to see what happens while (<DATA>) { chomp if CHOMP; #deletes "new line" if enabled my @characters = split(//,$_); my $i=0; foreach my $char (@characters) { print $i++, " $char\n"; } } =Program Outputs the following: Program Running 0 S 1 o 2 m 3 e 4 5 S 6 t 7 u 8 f 9 f 10 Note: this is the \n in the input string followed by the \n in the print 0 a 1 s 2 d 3 f 4 =cut __DATA__ Some Stuff asdf