Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Bits & pieces

by jdalbec (Deacon)
on Jul 19, 2005 at 03:01 UTC ( [id://475952]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Bits & pieces
in thread Bits & pieces

the two characters are negated in alternate calls to the closure.
For that to be true, $_{64} would have to be '010101010101010101010101'. But I see that the output of the closure is more predictable than I had thought at first. The final result depends only on the last three (to some extent, six) characters of the string (in fact it's the same as the last character of the string).
$O = 19, $C = ~$C& 0x4D; # bits 7+ all 0 $O = 20, $C = ~$C| 0x20; # bits 7+ all 1 $O = 21, $C = ~$C^ 0x70; # bits 7+ all 0 bits 6543210 $O = 22, $C = $C&~0x6F; # bits 7+ all 0 00?0000 $O = 23, $C = ~$C| 0x73; # bits 7+ all 1 1111111 $O = 24, $C = $C^~0x74; # bits 7+ all 0 1110100
I see also that I was bitten by contexts again. The correct list of values for &$s in scalar context is
# 0 4294967295 105 8 4294967263 73 8 4294967263 77 4 4294967291 +53 # 0 4294967295 116 20 4294967263 112 13 4294967282 125 16 4294967295 1 +16

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://475952]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-07-13 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.