From e1817ab9e1b3103a20f0236757fcabee412a82f7 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 25 Oct 2014 11:56:12 -0700 Subject: perldata: Document list repetition assignment --- pod/perldata.pod | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pod/perldata.pod') diff --git a/pod/perldata.pod b/pod/perldata.pod index b0f5e7ed70..436f135050 100644 --- a/pod/perldata.pod +++ b/pod/perldata.pod @@ -718,6 +718,10 @@ function: ($dev, $ino, undef, undef, $uid, $gid) = stat($file); +As of Perl 5.22, you can also use C<(undef)x2> instead of C. +(You can also do C<($x) x 2>, which is less useful, because it assigns to +the same variable twice, clobbering the first value assigned.) + List assignment in scalar context returns the number of elements produced by the expression on the right side of the assignment: -- cgit v1.2.1