while ( my $line = ) { $line =~ s/^\x{FEFF}//; print OUT $line; #### s/^\x{FEFF}//g