#!/opt/bin/perl
$[ = 1; # set array base to 1
$, = ' '; # set output field separator
$\ = "\n"; # set output record separator
$FS = ';';
line: while (<>) {
chomp; # strip record separator
@Fld = split(/[;\n]/, $_, 9999);
$id = $Fld[1];
if ($. == ($.-$FNRbase)) {
$ids{$id} = '';
next line;
}
if (!(defined $ids{$id})) {
print "$_\n";
}
}
continue {
$FNRbase = $. if eof;
}
At the moment I have to run the command like that: ./1.pl file1 file2 >outputfile
Can anybody help to built in all input and output files