Yes, perl doesn't know, else it wouldn't copy the array. But my question is _why_ doesn't it know? Unless I'm mistaken, there's enough information in the code to know that @a will not be used again--even at compile time. This seems like a trivial optimization to me, but as I say, perhaps I'm overlooking something.
in reply to Re: Why doesn't perl optimize this?
in thread Why doesn't perl optimize this?