foreach my $file ( @goners ) { unlink $file or warn "Could not unlink $file: $!"; }