Sir, the Perl one-liner you mention is just a cargo-cult solution that roams around the net. The stat[9] command is useless and so is the boolean comparison operator that immediately follows.
As you correctly point out, this one-liner, minus the cargo-cult part, deletes all the files in a directory quite fast, but doesn't go into the tree. To achieve deltree functionality, we would need to create a subroutine that deletes all the files, calls itself recursively upon each of the subdirectories (if present) and then deletes the subdirectory.
It can be done, but i'm not sure how it would perform in case the directory tree goes very, very deep and with a lot of branches. I hope it's not the case.
On a side note, it's funny how many of the bidders don't even list "Perl" among their skills.