diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2015-12-15 23:45:00 +0000 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-12-15 17:31:07 -0700 |
commit | 74bfae2735a1a8db05a542cdfe297a20fd5a113f (patch) | |
tree | aec871680392c02f42e6c5298afde1ec810b0097 /pod/perlref.pod | |
parent | 1257ab89e43729efdbaa81995f6c5a4fd9607d9f (diff) | |
download | perl-74bfae2735a1a8db05a542cdfe297a20fd5a113f.tar.gz |
Fix use of == to compare strings in perlref.pod
Diffstat (limited to 'pod/perlref.pod')
-rw-r--r-- | pod/perlref.pod | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perlref.pod b/pod/perlref.pod index e570b72cd3..5804c174bf 100644 --- a/pod/perlref.pod +++ b/pod/perlref.pod @@ -887,7 +887,7 @@ for obfuscated code: # @harry is (1,2,3) my $type = ref $thingy; - ($type ? $type == 'ARRAY' ? \@foo : \$bar : $baz) = $thingy; + ($type ? $type eq 'ARRAY' ? \@foo : \$bar : $baz) = $thingy; The C<foreach> loop can also take a reference constructor for its loop variable, though the syntax is limited to one of the following, with an @@ -906,7 +906,7 @@ arrays-of-arrays, or arrays-of-hashes: } foreach \my %h (@array_of_hashes) { - $h{gelastic}++ if $h{type} == 'funny'; + $h{gelastic}++ if $h{type} eq 'funny'; } B<CAVEAT:> Aliasing does not work correctly with closures. If you try to |