由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - a PERL opendir/readdir question
相关主题
请教各位先贤一个Perl 问题How to fix this? /bin/ls: Argument list too long
should the .dll and .lib have the same name?请教一个弱弱问题,关于#include的pathname
*** help needed! on MATLAB GUI ***how to include header file in other directory?
what's wrong with this scripts?variable passing?How to link math library in VC2005?
cgi测试newbee问题请教如何在VC6下面安装gsl?
remove a module from cvs请教,关于g++ -l的问题
sdk那个register directories with vs有什么用?面试题, 一个目录(directory)下一般最多放多少文件 ?
新手弱问:怎么让VC记住新添加的库文件?gdb debugging issue求助
相关话题的讨论汇总
话题: aug话题: readdir话题: 14话题: student话题: drwxr
进入Programming版参与讨论
1 (共1页)
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

1 (共1页)
进入Programming版参与讨论
相关主题
gdb debugging issue求助cgi测试newbee问题
question on user log in (转载)remove a module from cvs
在matlab中如何运行不在current working directory中的script?sdk那个register directories with vs有什么用?
g++找不到bitset新手弱问:怎么让VC记住新添加的库文件?
请教各位先贤一个Perl 问题How to fix this? /bin/ls: Argument list too long
should the .dll and .lib have the same name?请教一个弱弱问题,关于#include的pathname
*** help needed! on MATLAB GUI ***how to include header file in other directory?
what's wrong with this scripts?variable passing?How to link math library in VC2005?
相关话题的讨论汇总
话题: aug话题: readdir话题: 14话题: student话题: drwxr