Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^4: PERL chmod inconsistent with the LINUX equivalent

by ColonelPanic (Friar)
on Nov 22, 2012 at 10:30 UTC ( #1005102=note: print w/replies, xml ) Need Help??

in reply to Re^3: PERL chmod inconsistent with the LINUX equivalent
in thread PERL chmod inconsistent with the LINUX equivalent

Maybe I should have stated that a little less strongly. I don't have a problem with the chmod documentation as such. I just don't think "read the documentation" is the best answer when the documentation doesn't explicitly address the mistake the OP made. The significance of the leading zero might not be clear to someone who doesn't already know what it means.

When's the last time you used duct tape on a duct? --Larry Wall
  • Comment on Re^4: PERL chmod inconsistent with the LINUX equivalent

Replies are listed 'Best First'.
Re^5: PERL chmod inconsistent with the LINUX equivalent
by marto (Bishop) on Nov 22, 2012 at 11:02 UTC

    The point OP made is that perls chmod does not work the same as chmod on their linux system. The linux chmod command assumes that missing digits are leading zeros, perls chmod does not operate in the same manner. The docuemtnation I suggested reading (and understanding) provides examples and an explanation that the number passed should be an octal number. Perhaps to fully understand this I should also have suggested that OP read man chmod to understand why it works the way it does. The docs also point to portability issues on certain platforms.

    IMHO reading the documentation for each command provedes sufficent information to explain why they behave differently.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2016-10-25 11:03 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (317 votes). Check out past polls.