1. In this script, why do not $a and $b get flagged as requiring explicit package names?
#!/usr/bin/perl
use strict;
$a = 1;
$b = $a;
$c = $b;
exit;
d:\cgi-bin\test-strict.pl
Global symbol "$c" requires explicit package name at d:\cgi-bin\test-strict.pl line 5.
2. I want to use use strict but there are some variable exceptions peppered throughout the code. Can I create a block at the beginning that contains the exceptions? I'm thinking along the lines of:
no strict;
$v1;
$v2;
use strict;
$a;
$b;
but the above didn't work. Is there a way?
#!/usr/bin/perl
use strict;
$a = 1;
$b = $a;
$c = $b;
exit;
d:\cgi-bin\test-strict.pl
Global symbol "$c" requires explicit package name at d:\cgi-bin\test-strict.pl line 5.
2. I want to use use strict but there are some variable exceptions peppered throughout the code. Can I create a block at the beginning that contains the exceptions? I'm thinking along the lines of:
no strict;
$v1;
$v2;
use strict;
$a;
$b;
but the above didn't work. Is there a way?