- 論壇徽章:
- 0
|
foreach(@dir){ ## - Iterate through path
next if stat($_) && -d _; ## - Skip if directory exists
if ($NOOP) { ## - Don't make if $NOOP
print STDOUT "mkdir: $_\n";
}
這其中的 -d _中的_是什么意思啊,搞的暈了。
另外還有一段
unless(stat($name)) {
return -1;
}
return int(($time - (stat(_))[9]) / $hour_s);
中的stat(_)中的_是什么意思?下面是perldoc中的一段話。
If "stat" is passed the special filehandle consisting of an
underline, no stat is done, but the current contents of the stat
structure from the last "stat", "lstat", or filetest are
returned。
我理解是
-d中的_是上次stat($_)中的文件句柄?
stat(_)中的_也是stat($name)中的文件句柄?
大神們給點指點,謝謝噶 |
|