Skip to content

Commit 0ffd24a

Browse files
committed
perlop/perlvar: Mention diamond operators
Fixes Perl#23100
1 parent d85c3a2 commit 0ffd24a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pod/perlop.pod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3357,6 +3357,7 @@ mean C</^/m>.
33573357
=head2 I/O Operators
33583358
X<operator, i/o> X<operator, io> X<io> X<while> X<filehandle>
33593359
X<< <> >> X<< <<>> >> X<@ARGV>
3360+
X<diamond operator> X<double diamond operator>
33603361

33613362
There are several I/O operators you should know about.
33623363

@@ -3488,7 +3489,7 @@ and call it with S<C<perl dangerous.pl 'rm -rfv *|'>>, it actually opens a
34883489
pipe, executes the C<rm> command and reads C<rm>'s output from that pipe.
34893490
If you want all items in C<@ARGV> to be interpreted as file names, you
34903491
can use the module C<ARGV::readonly> from CPAN, or use the double
3491-
diamond bracket:
3492+
diamond operator:
34923493

34933494
while (<<>>) {
34943495
print;

pod/perlvar.pod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ command name itself. See L</$0> for the command name.
16351635
X<ARGV>
16361636

16371637
The special filehandle that iterates over command-line filenames in
1638-
C<@ARGV>. Usually written as the null filehandle in the angle operator
1638+
C<@ARGV>. Usually written as the null filehandle in the diamond operator
16391639
C<< <> >>. Note that currently C<ARGV> only has its magical effect
16401640
within the C<< <> >> operator; elsewhere it is just a plain filehandle
16411641
corresponding to the last file opened by C<< <> >>. In particular,
@@ -2455,7 +2455,8 @@ The functions C<accept()>, C<open()>, C<pipe()>, C<readpipe()> (as well
24552455
as the related C<qx> and C<`STRING`> operators), C<socket()>,
24562456
C<socketpair()>, and C<sysopen()> are affected by the lexical value of
24572457
this variable. The implicit L</ARGV> handle opened by C<readline()> (or
2458-
the related C<< <> >> and C<<< <<>> >>> operators) on passed filenames is
2458+
the related C<< <> >> (diamond) and C<<< <<>> >>> (double diamond)
2459+
operators) on passed filenames is
24592460
also affected (but not if it opens C<STDIN>). If this variable is not
24602461
set, these functions will set the default layers as described in
24612462
L<PerlIO/Defaults and how to override them>.

0 commit comments

Comments
 (0)