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 ?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: The mystery of double bitwise negation
by BrowserUk (Patriarch) on Jul 12, 2015 at 18:04 UTC | |
Re: The mystery of double negation
by shmem (Chancellor) on Jul 12, 2015 at 17:20 UTC | |
by hurricup (Pilgrim) on Jul 12, 2015 at 17:34 UTC | |
by tye (Sage) on Jul 12, 2015 at 22:51 UTC | |
by zwon (Abbot) on Jul 13, 2015 at 20:55 UTC | |
by tye (Sage) on Jul 13, 2015 at 21:51 UTC | |
by shmem (Chancellor) on Jul 12, 2015 at 17:41 UTC | |
by Laurent_R (Canon) on Jul 12, 2015 at 18:01 UTC | |
Re: The mystery of double bitwise negation
by ikegami (Patriarch) on Jul 13, 2015 at 17:04 UTC |
Back to
Seekers of Perl Wisdom