$/ 改变换行符

$/ 改变换行符

[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!
";  
        exit(-1);  

               }; 
my $a=$ARGV[0];
my $b=$ARGV[1];
my $c=$ARGV[2];
local $/='/*!*/;';
open (A,"<","$a");
     while (<A>){
      print $_;
      if  (( $_ =~/$bs+$c/i ) or ($_ =~/$bs+`zjzc`.`$c`/i) ){
      print $_;
        };
     sleep(10);
      };

原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199299.html