On Mon, Nov 28, 2016 at 08:14:23PM +1300, Kent Fredric wrote: > At parse time, the Perl compiler parsing the for { } block *lexically* > parses for a variable ( we'll just say $# for now ). > > And then upon detecting that variable's usage in its block, then instruments > the for loop to behave differently. what about: for (...) { eval '$#'; } > Also, my memory tells me lexicals are rather fast in comparison to > globals, but my memory could be wrong. Marginally faster. For example '$x = 1' uses about 3% fewer CPU instructions and 2% fewer data reads when $x is lexical. -- This is a great day for France! -- Nixon at Charles De Gaulle's funeralThread Previous | Thread Next