my $string = 'fred'; my( $i, $c ); say "$i:$c" while ($i,$c) = each $string; 0:f 1:r 2:e 3:d say while $_ = each $string; f r e d