From: Rafael Garcia-Suarez Date: Tue, 27 Oct 2009 08:58:58 +0000 (+0100) Subject: Better wording for the hash ~~ array docs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a8b2c106f7c4e82cbfd4fd5b0032b50f9499a67e;p=p5sagit%2Fp5-mst-13.2.git Better wording for the hash ~~ array docs (suggested by Aristotle Pagaltzis -- see [perl #69957]) --- diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 59f268e..5e80901 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -704,12 +704,12 @@ C does not. Any CodeRef scalar sub truth $b->($a) Hash Hash hash keys identical (every key is found in both hashes) - Array Hash hash slice existence grep { exists $b->{$_} } @$a + Array Hash hash keys intersection grep { exists $b->{$_} } @$a Regex Hash hash key grep grep /$a/, keys %$b undef Hash always false (undef can't be a key) Any Hash hash entry existence exists $b->{$a} - Hash Array hash slice existence grep { exists $a->{$_} } @$b + Hash Array hash keys intersection grep { exists $a->{$_} } @$b Array Array arrays are comparable[2] Regex Array array grep grep /$a/, @$b undef Array array contains undef grep !defined, @$b