in reply to Re: Anon. array of refs to a range generated list of scalars.
in thread Anon. array of refs to a range generated list of scalars.

This seems to suggest that when not used in for (foreach) a temporary array is created...
It's not clear. Certainly an array seems to be created in the case of \(5..9), because a reference to the array is returned. (This in itself is very odd.)

But in the case of @a = (5..9), there's no way to tell (without guts diving).
And the range operator is overloaded to have completely different semantics in scalar context,
so we can't even do the simple $n=(5..7); if ( $n == 3 ) test for an array.

jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.