KW.pm Coping with Other Peoples' Perl Code #9

use strict;

Second- Does it use strict?

  • Variables must be properly declared before use

  • Bareword identifiers must be subroutines

  • You can't use symbolic references such as:

                 use strict;
                 $ref = "foo";       # Global symbol "$string" requires explicit package name
                 print $$ref;        # Can't use string ("foo") as a SCALAR ref while "strict refs" in use
                 $string = blah;     # Bareword "blah" not allowed while "strict subs" in use

<< Previous | Index | Next >> Copyright © 2011 Daniel Allen