On Tue, 4 Dec 2001, Jorge Goncalvez <[EMAIL PROTECTED]> wrote,
> Hi, I wanted to delete all files under a directory but not the directory
> I tried this:
> my ($_path) = "c:/EventLogs/";
> unlink $_path if -r $_path;
>
> But it didn't delete teh files which are under the directory Eventslogs
> Why?
Say,
unlink $_path or die "unlink failed because $!";
will give you more information.
Btw, $_path contains directory, not files under it.
san
--
Trabas - http://www.trabas.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]