On 2019-10-29 7:48 p.m., 刘东 wrote:
Dear every one:
Hello.
I try to write a perl script to delet the content of file carp01_1_both.txt as
same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new
file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file
carp
This should do:
#!/usr/bin/perl
use strict;
use warnings;
open my $a, '<:encoding(UTF-8)', 'a' or die "Unable to open a: $!";
open my $b, '<:encoding(UTF-8)', 'b' or die "Unable to open b: $!";
my %pair = ();
while ( my $line = <$a> ) {
my @line = split(" ", $line);
$pair{$line[0]} = 1;
}
On 10/29/19 10:48 PM, 刘东 wrote:
Dear every one:
I try to write a perl script to delet the content of file
carp01_1_both.txt as same as from another file
carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file
carp-carp01_TKD181002053-1_1_sg.txt but excluding file
carp01_1_both.txt