for my $file (qw(files.txt data.txt)) { unlink $file; die "Unable to unlink '$file': $!" if -e $file; }