my @FH; for my $file ( qw/a.txt b.txt/ ) { open( $FH[ @FH ], '>', $file ) || ...; }