>>>>> "Michael" == Michael Lazzaro <[EMAIL PROTECTED]> writes:
Michael> Do people really do that? I must say, given that it looks *so
Michael> obviously* like it instead means [$a,$b,$c], I wonder if attempting to
Michael> take a reference to a list should be a compile-time error.
Michael> Note that this is still OK:
Michael> \($a) # same as \$a
Michael> because as previously discussed, it's the commas making the list, not
Michael> the parens. But \($a,$b,$c) seems like a bug waiting to happen. I
Michael> don't use it. Can someone give an example of an actual, proper, use?
It was to make "pass by reference" easier, before prototypes if I recall:
myfunc \($a, @b, %c);
which means the same as if we had said:
sub myfunc (\$ \@ \%);
myfunc($a, @b, %c);
Except that the prototyped version mandates the specific types.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!