in reply to The mystery of double bitwise negation
I'd say that the first one was completely pointless. Double bit-wise inversion of the constant 1 serves no purpose at all:
C:\test>perl -MDevel::Peek -le" my($m,$n) = (1,~~1); print Dump($m), ' + ', Dump( $n )" SV = IV(0x2ca374) at 0x15501c REFCNT = 1 FLAGS = (PADBUSY,PADMY,IOK,pIOK) IV = 1 SV = IV(0x2ca378) at 0x155010 REFCNT = 1 FLAGS = (PADBUSY,PADMY,IOK,pIOK) IV = 1
The second is a golfed version of scalar. Why? No idea.
|
|---|