< Perl Programming < Keywords

The CHECK keyword

CHECK is one of five code blocks that are executed at the beginning and end of a program by Perl. It is useful to catch the transition between the compilation phase and execution phase of the main program.

Although it can be prefixed with sub, this is not considered a good programming practice, as these blocks are not a subroutine.

Syntax

  CHECK BLOCK

See also

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.