http://qs1969.pair.com?node_id=1134400

hurricup has asked for the wisdom of the Perl Monks concerning the following question:

Hello again Monks!

Another day - another mystery. This time is about double bitwise negation (or strange form of smartmatch)

First encountered in DBM::Deep:

my %is_legal_filter = map { $_ => ~~1 } qw( store_key store_value fetch_key fetch_value );

Than, in Devel::Declare (even stranger form):

set_in_declare(~~@{$temp_name||[]});

Deparse says that at least first one is double negation, no-op. So - what for?

P.S. is the second example just a weird replacement for scalar ?