Perl去除文件重复行的脚本输入文件
Perl去除文件重复行的脚本
#!/usr/bin/perl
use warnings;
use strict;
my %hash;
my $source_file = “read.log”; #读取文件
my KaTeX parse error: Expected 'EOF', got '#' at position 27: … "write.txt"; #̲写入文件 open (FILE…source_file") or die “Cannot open file KaTeX parse error: Undefined control sequence: \n at position 2: !\̲n̲"; open (SORTED…dest_file”) or die “Cannot open file $!\n”;
while(defined (my KaTeX parse error: Expected '}', got '#' at position 27: …E>)) { #̲从文件中取出要去重的数据 …line); #去除空格
#$line=~ s/[\r\n]+//mg;#取出换行符
Perl去除文件的重复行
于 2021-02-25 08:34:28 首次发布