summaryrefslogtreecommitdiff
path: root/pod/perlop.pod
diff options
context:
space:
mode:
authorLudovic E. R. Tolhurst-Cleaver <camel@ltcdev.com>2015-08-17 21:30:59 -0400
committerJames E Keenan <jkeenan@cpan.org>2015-08-17 21:39:04 -0400
commitbf55d65d91cd95545972d61170706df20eba4db2 (patch)
tree262d8723ac932dea6063d1d6402e2760aa59bc8c /pod/perlop.pod
parent7c0c544ccc3283021df458dc39fb3638b44c2d6e (diff)
downloadperl-bf55d65d91cd95545972d61170706df20eba4db2.tar.gz
Clarify functioning of '||' operator.
Follow wording from Camel book, 4th ed., p. 120, per suggestion by Ludovic E. R. Tolhurst-Cleaver. Add Ludovic E. R. Tolhurst-Cleaver to AUTHORS. For: RT #125802
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r--pod/perlop.pod6
1 files changed, 3 insertions, 3 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod
index bed06959a6..b7ebbb1892 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -924,9 +924,9 @@ portable way to find out the home directory might be:
In particular, this means that you shouldn't use this
for selecting between two aggregates for assignment:
- @a = @b || @c; # this is wrong
- @a = scalar(@b) || @c; # really meant this
- @a = @b ? @b : @c; # this works fine, though
+ @a = @b || @c; # This doesn't do the right thing
+ @a = scalar(@b) || @c; # because it really means this.
+ @a = @b ? @b : @c; # This works fine, though.
As alternatives to C<&&> and C<||> when used for
control flow, Perl provides the C<and> and C<or> operators (see below).