作者beakdoosan (东大)
看板perl
标题Re: [请益]新手请教一下
时间Wed Mar 7 22:23:20 2007
※ 引述《abliou (Art of Life)》之铭言:
: open file,"<session.txt";
: while (<file>){
: /(\d+\.\d+\.\d+\.\d+)/;
: $hash{$1}++ ;
: }
: close file;
: open file,">temp.txt";
: print "$key = $value \n" while ($key,$value)=each %hash;
: close file;
感谢~~原来还有这麽简易的方法,看来我还需要多多加油,谢谢大家
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 221.169.170.106