A version that fixes both problems, and is still faster than unpack is
my $s = reverse $string; my $c; $c = chop $s while length $s;
In reply to Re^2: Efficient walk/iterate along a string
by moritz
in thread Efficient walk/iterate along a string
by gje21c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |