in reply to How to delete UNC directory on Windows

I have found ways to do this using system commands, but I would prefer to do this within Perl

Why? Do you have lots of UNC paths to remove? This:

perl -MTime::HiRes=time -wle"print time; system q[rd /s /q \\.\test\delete_this]; print time; 1201559494.81249 1201559494.82497

Takes all of 12 milliseconds to execute and consumes a whole extra 2k* of ram for that brief period.

*Assuming you started the script from a command line.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."