for $i (0 .. $max) { $c = substr($protein, $i, 1); # Process $c etc etc }