for my $file ( qw/ file1 file2 file3 file4 ) { if( -e $file ) { unlink($file) || print STDERR "error unlinking $file: $!\n"; } }