#!/usr/bin/perl
use warnings;
use strict;
use Text::CSV;
open my $LST, '<', 'ids.lst' or die $!;
my %id;
while (<$LST>) {
chomp;
$id{$_} = $.;
}
my @out;
my $csv = 'Text::CSV'->new({ sep_char => "\t",
eol => "\n",
});
open my $CSV, '<', 'file.csv' or die $!;
while (my $row = $csv->getline($CSV)) {
push @out, [ $id{ $row->[0] }, $row ] if exists $id{ $row->[0] };
}
$csv->print(*STDOUT, $_->[1]) for sort { $a->[0] <=> $b->[0] } @out;
####
#!/usr/bin/perl
use warnings;
use strict;
use Text::CSV;
my %record;
my $csv = 'Text::CSV'->new({ sep_char => "\t",
eol => "\n",
});
open my $CSV, '<', 'file.csv' or die $!;
while (my $row = $csv->getline($CSV)) {
$record{ $row->[0] } = $row;
}
open my $LST, '<', 'ids.lst' or die $!;
my %id;
while (<$LST>) {
chomp;
print $record{$_} if exists $record{$_};
}
####
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord
}map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,