while ( my $line = <$fh> ) { # each line now in $line my @characters = split //, $line; }