#!/usr/bin/perl -w ############################################################################## #### #!/usr/bin/perl use warnings; use strict; ############################################################################## #### open FH, "<:encoding(UTF-16)", "$file_folder\\$ori_datafile" or die "can't open file"; ... #open (NEWFILE, ">$file_folder\\$new_datafile") or die "can't open file"; open (NEWFILE, ">:encoding(UTF-16)","$file_folder\\$new_datafile") or die "can't open file"; open (FIXLOG, ">$log_folder\\$fix_log") or die "can't open file"; open (ERRLOG, ">$log_folder\\$error_log") or die "can't open file"; open (FIXRPT, ">$log_folder\\$rptfile") or die "can't open file"; #### chop; # aviod \n in last field; #### $ori_line_number=$ori_line_number+1; #### $ori_line_number += 1; #### $ori_line_number++; #### $pipe_thisline=($_ =~ tr/\|/\|/); #### $pipe_thisline = tr/|//; #### if ($pipe_thisline eq $right_pipes) { ... if ( $pipe_thisline > $right_pipes ) { #### if ($ori_line_number eq 1) { print FIXRPT "Report on Fixing Line Breaks in CT_Vendor_Summary File\n\n"; ... else { if ($pipe_sum eq 0 ) { ... elsif ($pipe_sum eq $right_pipes ) {