h**********r 发帖数: 174 | 1 Here is what is the directory:
-bash-3.00$ ls -al
total 7
drwxr-xr-x 5 x student 512 Aug 14 16:54 .
drwx------ 11 x student 3072 Aug 14 16:55 ..
-rw-r--r-- 1 x student 0 Aug 14 16:54 a.txt
drwxr-xr-x 5 x student 512 Aug 14 14:55 blackHole
-rw-r--r-- 1 x student 0 Aug 14 16:54 b.xml
drwxr-xr-x 2 x student 1024 Aug 14 16:42 coloring
drwxr-xr-x 11 x student 512 Aug 14 14:55 composed
As you can see, there are THREE directories and TWO normal files. I want to
process all of them. | t****t 发帖数: 6806 | 2 quote perldoc -f readdir:
If you’re planning to filetest the return values out of a
"readdir", you’d better prepend the directory in question.
Otherwise, because we didn’t "chdir" there, it would have been
testing the wrong file.
end quote | h**********r 发帖数: 174 | 3 thanks. This helps.
【在 t****t 的大作中提到】 : quote perldoc -f readdir: : If you’re planning to filetest the return values out of a : "readdir", you’d better prepend the directory in question. : Otherwise, because we didn’t "chdir" there, it would have been : testing the wrong file. : end quote
|
|