$/ 改变换行符
[root@zjzc01 binlog]# cat a1.pl
open (A,"<","aa");
# local $/;
$lines = <A>;
print $lines;
[root@zjzc01 binlog]# perl a1.pl
update ClientActionTrack set
[root@zjzc01 binlog]# cat a1.pl
open (A,"<","aa");
local $/;
$lines = <A>;
print $lines;
[root@zjzc01 binlog]# cat binlog.pl
if ( $#ARGV < 2 ){
print "please input file update|insert table_namee!\n";
exit(-1);
};
my $a=$ARGV[0];
my $b=$ARGV[1];
my $c=$ARGV[2];
local $/='/*!*/;';
open (A,"<","$a");
while (<A>){
print $_;
if (( $_ =~/$b\s+$c/i ) or ($_ =~/$b\s+`zjzc`\.`$c`/i) ){
print $_;
};
sleep(10);
};
$/ 改变换行符
最新推荐文章于 2023-01-09 17:26:29 发布