my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($filename)
if($size == 0)
print "盯培空枯则含文件"
请查看手册perl函数里的-X:凯陪誉 perldoc -f -X
-z File has zero size (is empty).
my $file = "/path/file.name"if (-z 乱戚$file) { 盯段... }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)