$ perl -e '$file_to_delete = "file.txt"; unlink $file_to_delete or die "Unable to unlink $file_to_delete: $!";'
$ perl -e '@files=glob("*.txt"); unlink(@files);'
Lines read from a file with the readline operator (<...>) will include the newline character. You'll need to remove it. Perl's$ perl -e 'open(FH, "list_files.dat") or die("Unable to open file.");@data=<FH>;close(FH);chomp(@data); unlink(@data);'