Skip to content

Commit a124b91

Browse files
committed
add :delete to Hash
1 parent 2791bbc commit a124b91

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/Type/Hash.pod

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,15 @@ The adverb C<:exists> returns C<Bool::True> if a key exists in the Hash. If more
266266
say %h<a>:exists; # True
267267
say %h<a b>:exists; # (True True)
268268
269+
=head2 C<:delete>
270+
271+
Use C<:delete> to remove a C<Pair> from the C<Hash>.
272+
273+
my %h = a => 1;
274+
dd %h; # Hash %h = {:a(1)}
275+
%h<a>:delete;
276+
dd %h # Hash %h = {}
277+
269278
=head2 C<:p>
270279
271280
The adverb C<:p> returns a C<Pair> or a List of C<Pair> instead of just the value.

0 commit comments

Comments
 (0)