length has to count every character in the string.This isn't C. (I've been writing this a lot lately for some reason.) The size of a Perl scalar is stored in its metadata; all length has to do is look it up. This is much faster than either of the other functions. You can put NULs in the middle of Perl strings without any problems, remember?
Makeshifts last the longest.
In reply to Re^2: Variable assignment confusion
by Aristotle
in thread Variable assignment confusion
by sweetblood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |