Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

perlfunc:chmod

by gods
on Aug 24, 1999 at 22:43 UTC ( #305=perlfunc: print w/replies, xml ) Need Help??

chmod

See the current Perl documentation for chmod.

Here is our local, out-dated (pre-5.6) version:


chmod - changes the permissions on a list of files



chmod LIST



Changes the permissions of a list of files. The first element of the list must be the numerical mode, which should probably be an octal number, and which definitely should not a string of octal digits: 0644 is okay, '0644' is not. Returns the number of files successfully changed. See also oct, if all you have is a string.

    $cnt = chmod 0755, 'foo', 'bar';
    chmod 0755, @executables;
    $mode = '0644'; chmod $mode, 'foo';      # !!! sets mode to
                                             # --w----r-T
    $mode = '0644'; chmod oct($mode), 'foo'; # this is better
    $mode = 0644;   chmod $mode, 'foo';      # this is best

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[Corion]: marto: Yeah, that's somewhat implied :) I was on the phone with my godson yesterday (they birthday), but I haven't seen them for two weeks now (vacation), relaxing, but I somewhat miss them too ;)
[Discipulus]: me waterpolo? oh no! i'm a no sport; the tournment was for the elder son
[karlgoethebier]: good morning
[Corion]: Discipulus: Ah, so he's the one getting almost drowned all the time - waterpolo certainly is no sport for me ;)
[karlgoethebier]: Corion: buy enough coke and popcorn...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2017-07-24 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (348 votes). Check out past polls.