in reply to match two files
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11124864 use warnings; use Path::Tiny; my %two = map /^(\d+)(.*)/, path('tmp02')->lines; my $out = "PeptideID ProteinID SpectrumID Sequence\n"; s/^(\d+)(.*)/$1$2$two{$1}/ and $out .= $_ for path('tmp01')->lines; path('tmp11_quick')->spew($out);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: match two files
by yueli711 (Sexton) on Dec 09, 2020 at 16:45 UTC | |
by tybalt89 (Monsignor) on Dec 09, 2020 at 17:27 UTC | |
by yueli711 (Sexton) on Dec 09, 2020 at 18:13 UTC | |
by tybalt89 (Monsignor) on Dec 09, 2020 at 19:03 UTC |
In Section
Seekers of Perl Wisdom