411 REFERENCE · Wikibooks
Perl Programming/Keywords/BEGIN
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Perl AUTOLOAD bind Keywords
The BEGIN keyword
BEGIN is one of five code blocks that are executed at the beginning and end of a program by Perl. It is create the block that is executed ASAP after the Perl interpreter starts. More than one BEGIN block may exist within a file or an eval'd string, and they are executed in order of definition.
Although it can be prefixed with sub, this is not considered a good programming practice, as these blocks are not a subroutine.
Syntax
BEGIN BLOCK
See also
CHECK
END
INIT
UNITCHECK
Perl AUTOLOAD bind Keywords