To be more precise, the \ operator gives its argument list context, which may surprise many people (it did me).
Why would this surprise you? :)
If I ask for a reference to an array that contains ('foo', 'bar', 'baz'), I expect a reference to an array that has three elements in it, not the number 3 (as would be the case if \ provided scalar context for its arguments.)
| [reply] |
| [reply] |
\@foo # reference to array @foo
\(@foo, $a) # list of reference to array @foo and scalar $a
\(@foo) # list of references to contents of @foo
| [reply] [d/l] |
Read Arrays are not lists and Scalars, Lists, and Arrays and repeat to yourself three times - "('foo', 'bar', 'baz') is not an array" ;-)
I can't be blamed if you don't read my post. ;-) I didn't say ('foo', 'bar', 'baz') was an array, I said If I ask for a reference to an array that contains ('foo', 'bar', 'baz').
HTH.
| [reply] |