$mystring="bob"; $length=length $mystring; print "\$mystring has a length of $length\n";