|
发表于 2004-6-11 09:23:52
|
显示全部楼层
我的蠢方法
- #!/usr/bin/perl -w
- print "输入你需要查询的内容: ";
- chomp($qu=<STDIN> );
- print "-"x70,"\n";
- while($qu ne "q"){
- open(TEL,"Tel_lu_an.txt")|| die "Can't open Tel book $!\n";
- while(<TEL> ){
- if(/$qu/) { print }
- }
- print "-"x50,"\n";
- close TEL;
- print "输入你需要查询的内容:";
- chomp($qu=<STDIN> );
- print "-"x70,"\n";
- }
复制代码 |
|