February 2012
Intermediate to advanced
1184 pages
37h 17m
English
use strict; # Install all three strictures. use strict "vars"; # Variables must be predeclared use strict "refs"; # Can't use symbolic references use strict "subs"; # Bareword strings must be quoted use strict; # Install all... no strict "vars"; # ...then renege on one use v5.12; # by default with v5.12.0 or later
This lexically scoped pragma changes some basic rules about what
Perl considers to be legal code. Sometimes these restrictions seem too
strict for casual programming, such as when you’re just trying to whip up
a five-line filter program. The larger your program, the stricter you need
to be about it. If you declare a minimum version of perl with use, and that minimum version is v5.12 or later,
you get strictures implicitly.
Currently, there are three possible things to be strict about:
subs, vars, and refs. If no import list is supplied, all three
restrictions are assumed.