Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Why does Perl let me delete read-only files? Why does -i clobber protected files? Isn't this a bug in Perl?

by faq_monk (Initiate)
on Oct 13, 1999 at 03:42 UTC ( #819=perlfaq nodetype: print w/replies, xml ) Need Help??

Current Perl documentation can be found at perldoc.perl.org.

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

This is elaborately and painstakingly described in the ``Far More Than You Ever Wanted To Know'' in http://www.perl.com/CPAN/doc/FMTEYEWTK/file-dir-perms .

The executive summary: learn how your filesystem works. The permissions on a file say what can happen to the data in that file. The permissions on a directory say what can happen to the list of files in that directory. If you delete a file, you're removing its name from the directory (so the operation depends on the permissions of the directory, not of the file). If you try to write to the file, the permissions of the file govern whether you're allowed to.

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[davido]: If you ever doubt the progress made in CPU technology: I have a script that runs in 2m20s on a Core2-Duo with 8GB RAM and an SSD. On an i7-2700K, also with SSD, same script runs in 12.5s.
[davido]: That's a 2nd Gen i7, but it is OC'ed from 3.5GHz to 4.6. ...things break down for awhile following 2nd gen though; the 2nd gen i7 2700k beats my Haswell (4th gen) i7 laptop by about 30%

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2017-11-22 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (326 votes). Check out past polls.

    Notices?