use strict; no strict 'refs'; foreach my $fd (qw(FILE STDOUT STDERR)) { print $fd "testing\n"; } use strict;