From: Gurusamy Sarathy Date: Tue, 9 Feb 1999 00:03:26 +0000 (+0000) Subject: clarify docs for change#2835 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26ef7447c0b4d04a31bae92a55d2f6f9abf46c3c;p=p5sagit%2Fp5-mst-13.2.git clarify docs for change#2835 p4raw-link: @2835 on //depot/perl: 8127e0e3c3aeffc5d0bcdebd664c0fd7cd5bd9fe p4raw-id: //depot/perl@2845 --- diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 0de44db..da8a24e 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -109,8 +109,16 @@ remains unchanged. See L. =item Improved C operator -The C operator is now evaluated at compile time instead of being -replaced with a run time call to C. +The C operator is now evaluated at compile time into a true list +instead of being replaced with a run time call to C. This +removes the confusing behavior of C in scalar context stemming from +the older implementation, which inherited the behavior from split(). + +Thus: + + $foo = ($bar) = qw(a b c); print "$foo|$bar\n"; + +now correctly prints "3|a", instead of "2|a". =head1 Supported Platforms diff --git a/pod/perlop.pod b/pod/perlop.pod index 4b49808..b386651 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -1046,7 +1046,14 @@ equivalent to: split(' ', q/STRING/); -the difference being that it generates a real list at compile time. +the difference being that it generates a real list at compile time. So +this expression: + + qw(foo bar baz) + +is exactly equivalent to the list: + + ('foo', 'bar', 'baz') Some frequently seen examples: