Kamalraj  Singh  Madhan, Noida [KSM], on Friday, February 4, 2005 at
13:38 (+0530 ) typed:

KSM>     Kindly let me know if this possible, deleting some selected files from 
a
KSM> directory through a perl script. This selection would be based on the
KSM> filename existing in a particular text file, if it exists then delete from
KSM> directory otherwise not since I do not want to delete all of the files in
KSM> this directory.

my @files = ( 'D:\test\test.txt', 'D:\test\test2.txt' );
#if you want read read that txt with file list:
#my @files = `cat filelist.txt`; #or use type, if you haven't cat
unlink $_ or warn "Can't delete $_ $!\n" for (@files);

somtehing like this ? (untested:)

-- 

 ...m8s, cu l8r, Brano.

[I live in a quiet neighborhood - they use silencers.]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to