APM: chmod doesn't die
Ren Maddox
renm at iname.com
Mon Apr 28 14:33:30 CDT 2003
On Mon, 2003-04-28 at 11:36, Goldilox wrote:
[...]
> chmod 0766,$thumbsfile || no_way();#die "Can't chmod 766 $thumbsfile: $!";
[...]
As long as $thumbsfile has a (true) value, no_way() will never be
called. This is because "||" binds more tightly than ",". Instead, use
either of:
chmod(0766, $thumbsfile) || no_way();
chmod 0766, $thumbsfile or no_way();
--
Ren Maddox <renm at iname.com>
More information about the Austin
mailing list