@@ -2450,23 +2450,20 @@ appropriate adverb to the subscript.
2450
2450
@array[0,1,2] :kv; # returns 0, 'A', 1, 'B'
2451
2451
@array[0,1,2] :k; # returns 0, 1
2452
2452
@array[0,1,2] :v; # returns 'A', 'B'
2453
- @array[0,1,2] :vk; # returns 'A', 0, 'B', 1
2454
2453
2455
2454
%hash = (:a<A>, :b<B>);
2456
2455
%hash<a b c>; # returns 'A', 'B', (Any)
2457
2456
%hash<a b c> :p; # returns a => 'A', b => 'B'
2458
2457
%hash<a b c> :kv; # returns 'a', 'A', 'b', 'B'
2459
2458
%hash<a b c> :k; # returns 'a', 'b'
2460
2459
%hash<a b c> :v; # returns 'A', 'B'
2461
- %hash<a b c> :vk; # returns 'A', 'a', 'B', 'b'
2462
2460
2463
2461
These adverbial forms all weed out non-existing entries if the
2464
2462
adverb is true; if not, they leave them in, just as an ordinary slice would.
2465
2463
So:
2466
2464
2467
2465
@array[0,1,2] :!p; # returns 0 => 'A', 1 => 'B', 2 => (Any)
2468
2466
%hash<a b c> :!kv; # returns 'a', 'A', 'b', 'B', 'c', (Any)
2469
- %hash<a b c> :!vk; # returns 'A', 'a', 'B', 'b', (Any), 'c'
2470
2467
2471
2468
Likewise,
2472
2469
@@ -2537,20 +2534,16 @@ These combinations are considered legal and mean the following:
2537
2534
:delete :!p delete, return pairs of all keys attempted
2538
2535
:delete :kv delete, return key/values of actually deleted keys
2539
2536
:delete :!kv delete, return key/values of all keys attempted
2540
- :delete :k delete, return actually deleted keys
2541
- :delete :!k delete, return all keys attempted to delete
2542
2537
:delete :v delete, return values of actually deleted keys
2543
2538
:delete :!v delete, return values of all keys attempted
2544
- :delete :vk delete, return value/keys of actually deleted keys
2545
- :delete :!vk delete, return value/keys of all keys attempted
2539
+ :delete :k delete, return actually deleted keys
2540
+ :delete :!k delete, return all keys attempted to delete
2546
2541
:delete :exists delete, return Bools indicating keys existed
2547
2542
:delete :!exists delete, return Bools indicating keys did not exist
2548
2543
:delete :exists :p delete, return pairs with key/True for key existed
2549
2544
:delete :exists :!p delete, return pairs with key/Bool whether key existed
2550
2545
:delete :exists :kv delete, return list with key,True for key existed
2551
2546
:delete :exists :!kv delete, return list with key,Bool whether key existed
2552
- :delete :exists :vk delete, return list with True,key for key existed
2553
- :delete :exists :!vk delete, return list with Bool,key whether key existed
2554
2547
2555
2548
An implementation is free to silently ignore any other combinations or
2556
2549
silently prefer one of the adverbs given above any other.
0 commit comments