Mr. Shawn H. Corey wrote:
On Fri, 2008-09-05 at 19:09 +0100, brian54321uk wrote:
HI again
I would like to test a folder full of files, and if a file contains abc123blue or xyz357green then that file is to be deleted.
What would be the best way of achieving this please?

If however, it would be simpler for the script to empty the files contents, that's not a problem as I have another script that I can run which deletes empty files.

thanks
Brian


To delete a file, see `perldoc -f unlink`.
To empty a file, see `perldoc -f truncate`.


do you mean if the content of the file contains "abc123blue || xyz357green" or if the filename contains abc123blue || xyz357green.


goksie


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


Reply via email to