http://www.ibm.com/cn/?cm_re=masthead-_-backcountry-_-top_level
-_- 表情都用上了!
Archive for September, 2007
IBM的一条链接
By admin in By-TalkPERL遍历目录并忽略相关目录或文件
By admin in Technic总算搞明白如何使用了,过程只是在原来的基础上做出改进.现记录一下!
#!/usr/bin/perl
use Cwd;
use File::Find;
$PATH = ‘/Users/www/documents/’;
find(\&printFilename, $PATH);
sub printFilename {
next unless -f $_;
$_ = $File::Find::name;
if (/.DS_Store/ | /document/) {
return 0;
}
print $File::Find::name;
[...]
PERL 的vardump
By admin in Technic最近在狂研究perl 都是一些很简单的东西!却浪费了大量的时间!
人笨!现在在恶补!
php 下面有var_dump 或者print_r
prel 下可以用用 DATA的Dumper
#!/usr/bin/perl
use Data::Dumper;
@test = (
["a", "b", "c", "d", "e",
["e", "g"]],
["i", "j", "k", "l", "m",
["n", "o"]],
);
print Dumper(@test);
PERL 遍历目录
By admin in By-Talk#!/usr/bin/perl
use File::Find;
#定义目录地址
$dirPath=”/Users/haozi/www/”;
sub process_file {
#一些附加条件的判断
system $File::Find::dir;
if (m/.svn$/) {
print ‘…………………………..’;
}
print “Dir name: “, $File::Find::dir, “\n”;
print “File name: “, $_, “\n”;
print “Full name: “, $File::Find::name, [...]