
mauto
User
Jul 22, 2002, 10:33 AM
Post #5 of 17
(1120 views)
|
Thanks. I have a long list of files. I want to modify your script to read them from a text file and delete them one at a time if they exist. currently, I have the following: my $path = 'c:/temp/'; (@files) = ($path . 'file1.txt', $path . 'file2.txt', $path . 'file3.txt', $path . 'file4.txt', $path . 'file5.txt', $path . 'file6.txt', $path . 'file7.txt', $path . 'file8.txt'); foreach my $file (@files) { unlink($file) if -e $file; }
|