in reply to Re: creating a variable in an if statement
in thread creating a variable in an if statement

Actually, perl has a three pass 'compiler', for want of a better term, followed by a tree-threaded interpreter. The order of execution is not known at the time the declarations are compiled into the code tree. If you have multiple declaration with a statement there is no 'execution order' all the declarations get compiled into the code tree initially.

perlguts says 'bottom up' I'm not sure what this means. I think in this case it means that the 'if' is built from the inside out and the compiler, upon building out one branch of the conditional, can't see down the other branch to spot the other declaration, but that's just speculation on my part.


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}