my $s = reverse $string; my $c; $c = chop $s while length $s;