代码如下:
#! usr/bin/perl -w
use strict;
use warnings;
open (FILE,"./a.txt") or die "can't open file:$!";
open (NEWFILE,"./b.txt") or die "can't open file:$!";
while(my $line =
{
chomp($line);
my $newline = $line =~ s/4/5/g;
print NEWFILE $newline;
}
close FILE;
close NEWFILE;
还用刚才你那个脚本吧,呵呵[ol][*]#!/usr/bin/perl -w[*][*]open (OUT,\">print_out.txt\");[*]select OUT;[*]while(){[*]? ?? ???($a,$b)=split;[*]? ?? ???$a=~s/\\-//g;[*]? ?? ???$b=~s/\\.//g;[*]? ?? ???$b=uc $b;[*]? ?? ???print \"$a\\n$b\\n\";[*]? ?? ???if($a eq $b){[*]? ?? ?? ?? ?? ? print \"The two MAC addr is eq!\\n\";[*]? ?? ???}else{[*]? ?? ?? ?? ?? ? print \"The two MAC addr is diff!\\n\";[*]? ?? ???}[*]}[*]select STDOUT;[*][*][*][*][*]__DATA__[*]00-50-56-C0-00-08 0100.0ccc.cccc[/ol]
我的手机索爱LT18i,办理了GPRS套餐,但是程序不能联网,请问如何在手机上设置GPRS参数呢