6
为什么在Perl中为文件设置perms时需要使用int()函数?为什么在Perl chmod中使用int()?
die "blab, blah"
if (! chmod(int(0664), $tmp_file));
我能理解运用华侨城()如下面的perldoc例如:
$mode = "0644"; chmod(oct($mode), $tmp_file);
但INT()函数?
编辑
只是为了完整性,这里是从的perldoc -f CHMOD推荐...
$mode = 0644; chmod $mode, "foo"; # this is best