Syntactic Confectionery Delight | |
PerlMonks |
Re: chmod in perlby graff (Chancellor) |
on Mar 11, 2011 at 05:34 UTC ( [id://892587]=note: print w/replies, xml ) | Need Help?? |
If you happen to be on a unix/linux system (which is pretty much the only place where chmod makes sense), you should be aware that chmod will fail when used on a file that is not owned by the user who is running the script. (update: unless of course the user happens to be "root" -- in which case the user really ought to know what s/he is doing...)
As mentioned above, checking the return value (and printing the value of $! when chmod returns false) will help you figure out what is going on.
In Section
Seekers of Perl Wisdom
|
|