Biker has asked for the wisdom of the Perl Monks concerning the following question:
Guess I'm missing something basic here. (Again ;-)
How come that this compiles (and executes) fine:
while this fails to compile with the error message "Global symbol "$epoch" requires explicit package name at <path and module> line 95."my $epoch; $epoch=stat($self->{ABS_FILENAME})->mtime&&do{ $self->{CONFIG_EPOCH}=$epoch; };
I see it that $epoch gets unconditionally created with a conditional value (depending on the outcome of stat) and as such must exist. Looks like Perl is not as sure as I am. Why?my $epoch=stat($self->{ABS_FILENAME})->mtime&&do{ $self->{CONFIG_EPOCH}=$epoch; };
This is with Perl 5.6.1 from Active State.
Everything went worng, just as foreseen.
Back to
Seekers of Perl Wisdom