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

Re^2: POSIX::S_ISDIR() ... octal strings, bit manipulations

by Sandy (Curate)
on Oct 05, 2009 at 19:19 UTC ( [id://799324]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $d = "16895";
    my $f = "33206";
    ...
    my $l43b = $d & oct(70); # still 6 bits though,
    $l43b  = $l43b >> 3;
    print "$od and oct(70) shifted 3 bits to the right = ",sprintf("%o",$l
    +43b)," in octal\n";
    
  2. or download this
    16895->40777
    33206->100666
    ...
    33188->100644
    lowest three bits of octal 40755 is 5
    40755 and oct(70) shifted 3 bits to the right = 5 in octal
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found