Set to a non-zero integer value to do multi-line matching within a string, 0 (or undefined) to tell Perl that it can assume that strings contain a single line, for the purpose of optimizing pattern matches. Pattern matches on strings containing multiple newlines can produce confusing results when
$* is 0 or undefined. Default is undefined. (Mnemonic: * matches multiple things.) This variable influences the interpretation of only
$. A literal newline can be searched for even when
$* == 0.
$* is deprecated in modern Perl, supplanted by the
/m modifiers on pattern matching.
Assigning a non-numerical value to
$* triggers a warning (and makes
$* act if
$* == 0), while assigning a numerical value to
$* makes that an implicit
int is applied on the value.