- 论坛徽章:
- 0
|
原文件 more num.txt
74.9556295527223
74.9556295527223
73.9794114994725
64.082213215772
64.082213215772
75.5556572341628
75.6916743240836
75.5942370778122
72.3280376557477
72.3280376557477
71.8689338583767
71.8424744261558
71.8689338583767
64.082213215772
71.842474426155
ericlee:beijing
ash
hello the world!
cat new.txt
527223
15772
341628
778122
557477
261558
15772
ijing
world!
代码:
more py1.pl
#!/usr/bin/perl -w
open N,"num.txt";
open F,"+>new.txt";
while (<N>) {
$del=substr($_,0,10);
s/$del//;
print F unless $.%2;
}
处理过的文件: |
|