in reply to Re: Looking Backward While counting
in thread Looking Backward While counting

Just a very minor point regarding your code. You don't need to tr/x/x/ when just counting characters; tr/x// will do.

knoppix@Microknoppix:~$ perl -E ' > $str = q{banana}; > say $str; > $cnt = $str =~ tr{a}{}; > say $cnt; > say $str;' banana 3 banana knoppix@Microknoppix:~$

Cheers,

JohnGG