constant
A Perl pragma that declares compile-time constants with a given
scalar or list value. By default, the value is evaluated in list
context, but you can override the default by specifying scalar
.
use constant NAME1 => value1; use constant NAME2 => scalar value2;
Get Perl in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.