in reply to Counting Characters
$string = "teststring"; sprintf "%s%n", $string, $len; print "$len"; [download]
perldoc -f sprintf [download]