my $c; for ( my $i = 0; $i < length($string); $i++ ) { $c = substr( $string, $i, 1); }