See. perlop, perlre and substr for more info.while($str =~ /\G(.)/gs) { ... } ## or with substr() my $i = 0; while( defined(my $c = substr $str, $i++, 1 )) { ... }
_________
broquaint
In reply to Re: foreach (each character in string..)?
by broquaint
in thread foreach (each character in string..)?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |