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