in reply to string variable size

length will do just that.
$mystring="bob"; $length=length $mystring; print "\$mystring has a length of $length\n";
In this case length will return 3.