Perl Programming/Keywords/do

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Previous: die Keywords Next: dump

The do keyword[edit | edit source]

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 | edit source]

  do BLOCK

Examples[edit | edit source]

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