in reply to Re: Use of uninitialised value... but it is defined ?!
in thread Use of uninitialised value... but it is defined ?!
this kind of problems happened to me too some time (years?) ago until i realized the right order.
my $variable = 'value'; ----------- ---------- | 1 | 3 BEGIN{ say $variable} --------------------- | 2
As the OP reveals, the compiletime runtime order implication is not so easely intellegible from docs: maybe is worth to put a note in perlmod where BEGIN block is described (well i do not understand why it is here, anyway; a separtate tutorial about the phases of the Perl process would not be better?).
The OP can profits the read of some stuffs about the matter:
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Use of uninitialised value... but it is defined ?!
by AnomalousMonk (Archbishop) on Mar 02, 2016 at 17:27 UTC |