in reply to Re^2: cgi session
in thread cgi session
Basically, if you use strict (and you should) variables declared with "my" can only be used from the declaration on until the end of the scope they're declared in:
Using "my" (lexical) variables together with "strict" will significantly reduce the risk of typos or modifying "unrelated" variables.sub mysub { my $var1 = 1; # here you can use $var1 } $var1 = "boo"; # compile error: there is no $var1 declared in this sco +pe.
|
|---|