my %results; { local @ARGV = ( 'q1.fa', 'q2.fa' ); /^>/ or push @{ $results{ $ARGV } }, $_ while <>; }