Get the length of a string : length « String « Perl






Get the length of a string

   

#!C:/perl/bin

$stringvalue = "Perl is a great language";
$stringlength = length($stringvalue);

print "\n\nThe length of the string is: $stringlength\n\n";

   
    
    
  








Related examples in the same category

1.Passing variable to length() function
2.The length of string with whitespace
3.Using length function to check the length of a string
4.Calculating the length of $string