It creates a global variable named $VERSION. The use of a BEGIN block ensures the variable is set before other code in the script has run. See the documentation for BEGIN and use vars. Here is a nice introduction to BEGIN blocks. Note that use vars has been superseded by our. This use vars vs our vs $main:: for $VERSION node has a discussion that you may find helpful.