How to use the string length() function in Perl
Programming | Perl | Wednesday, 25 January 2012 09:07
Perl string length() function
Perl's length() function simply returns the length of a perl string in characters.
Problem
Solution
In this example, we've created a string with the value "Welcome to length function in Perl". When we run the length function on the string, it will return 34, or the total number of characters in the string. Note that this does not count the size of the string in bytes - just the length in characters.
| |
|
|
| |






