for my $f ( @filenames ) { open my $in, $f or die $!; print uc while <$in>; close $in; }