in reply to Re: Re: chmod and oct
in thread chmod and oct

Why doesn't a trick like this work then?
$chmod='0644'; chmod $chmod+0, $file;
It doesn't work because "leading zero means octal" applies only to numbers, not strings of numeric digits.

Try this:   print 0644, " != ", '0644' + 0, "\n"; This is all described in the on-line doc, in perldata.