open(FILE_A,">","a.txt") || ...; open(FILE_B,">","b.txt") || ...; my @FH=(*FILE_A,*FILE_B);