You can check this using a different method:$str="There's many more ways to do it.\n"; $str =~ tr/\000-\xff/./; while ( $str =~ /(.)/g ) { $count++; }
$count2++ while chop $str; $count eq $count2 or warn "there's something wrong with this code.\n";
In reply to Re: Counting number of characters in a string
by petral
in thread Counting number of characters in a string
by jeffpflueger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |