Perl Programming/Keywords/do

Previous: die Keywords Next: dump

The do keyword

edit

do is the command that returns the value of the last command in the following command sequence BLOCK. When this command is modified by while or until, it executes the BLOCK once before checking the loop condition.

Syntax

edit
  do BLOCK

Examples

edit
do "trigonometry.pl";
Previous: die Keywords Next: dump