lexical variable $variable has not been created, so the global variable of that name is usedUm ,no: the BEGIN block sees the lexical var, not the package var:
$x = 'pkg'; my $x; BEGIN { $x = 'lex' } print "$::x $x\n"; #prints pkg lex
Dave.
In reply to Re^2: Use of uninitialised value... but it is defined ?!
by dave_the_m
in thread Use of uninitialised value... but it is defined ?!
by seki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |