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`.
--
Just my 0.00000002 million dollars worth,
Shawn
"Where there's duct tape, there's hope."
Cross Time Cafe
"Perl is the duct tape of the Internet."
Hassan Schroeder, Sun's first webmaster
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/