$/ 改变换行符

$/ 改变换行符

[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);
      };

posted @ 2016-08-26 13:14  czcb  阅读(325)  评论(0编辑  收藏  举报