in reply to what perl module to include to use string length function?

...my script is throwing an error which indicates my global symbol requires explicit package name. Is there a perl module I need to include to use the perl string length function?

No. This is just a matter of learning how to program with strictures enabled. Your script probably has use strict; somewhere toward the top. strict does three things (all with the aim of making your life easier as a programmer, and your code more robust): (1), it requires that you pre-declare your variables (strict vars). (2), it requires that you avoid symbolic references; using a variable's contents as a variable name (strict refs). (3) It requires that you not leave barewords laying around (strict subs).

Your code is failing because you have violated one of the rules that 'strict' enforces; strict vars -- you haven't pre-declared a variable that you are using. This could be an oversight, or it could be a spelling error in your code. Either way, it's a compile time error, and totally unrelated to using length.


Dave