From 0ffd24a8dabeca2d76163851068f41883d7f3a30 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 3 May 2025 19:19:54 -0600 Subject: [PATCH] perlop/perlvar: Mention diamond operators Fixes #23100 --- pod/perlop.pod | 3 ++- pod/perlvar.pod | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pod/perlop.pod b/pod/perlop.pod index 0b2d144dc895..f2ab7df227a2 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -3357,6 +3357,7 @@ mean C. =head2 I/O Operators X X X X X X<< <> >> X<< <<>> >> X<@ARGV> +X X There are several I/O operators you should know about. @@ -3488,7 +3489,7 @@ and call it with S>, it actually opens a pipe, executes the C command and reads C's output from that pipe. If you want all items in C<@ARGV> to be interpreted as file names, you can use the module C from CPAN, or use the double -diamond bracket: +diamond operator: while (<<>>) { print; diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 29f8d7fc4a03..7f5cb1ed60b0 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -1635,7 +1635,7 @@ command name itself. See L for the command name. X The special filehandle that iterates over command-line filenames in -C<@ARGV>. Usually written as the null filehandle in the angle operator +C<@ARGV>. Usually written as the null filehandle in the diamond operator C<< <> >>. Note that currently C only has its magical effect within the C<< <> >> operator; elsewhere it is just a plain filehandle corresponding to the last file opened by C<< <> >>. In particular, @@ -2455,7 +2455,8 @@ The functions C, C, C, C (as well as the related C and C<`STRING`> operators), C, C, and C are affected by the lexical value of this variable. The implicit L handle opened by C (or -the related C<< <> >> and C<<< <<>> >>> operators) on passed filenames is +the related C<< <> >> (diamond) and C<<< <<>> >>> (double diamond) +operators) on passed filenames is also affected (but not if it opens C). If this variable is not set, these functions will set the default layers as described in L.