in reply to match text files
Here is my outline:
use strict; use warnings; open (my $fh, "<", "C:/position.txt"); my %position = map { split /\t/, $_, 2 } <$fh>; # not sure about this close($fh); open (my $file, "<", "C:/platform.txt"); open (my $newfile, ">", "C:/result.txt"); foreach my $line (<$file>) { my( $start, $rest ) = split /\t/, $line, 2; print $newfile $start, "\t", $position{$start},"\t", $line if exists + $position{$start}; } close($file); print "DONE";
|
|---|