in reply to sub BEGIN
Five specially named code blocks are executed at the beginning and at the end of a running Perl program. These are the BEGIN , UNITCHECK , CHECK , INIT , and END blocks.So - you cannot access BEGIN.These code blocks can be prefixed with sub to give the appearance of a subroutine (although this is not considered good style). One should note that these code blocks don't really exist as named subroutines (despite their appearance).
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
|
|---|