$chars = length($scalar); # length in characters # what you probably were looking for