[Perl 6] Deleting key/value pairs from a hash.
cwchen Oct 28th, 2017 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- my %hash = one => "eins", two => "zwei", three => "drei";
- %hash.keys.elems == 3 or die "Wrong count";
- # Delete one key-value pair.
- %hash.keys.elems == 2 or die "Wrong count";
RAW Paste Data