for (@files) { ... stuff ... open my $output => ">", $filename or die "...."; print $output $built; push @built => [$filename => $_]; }