in reply to Why -M doesn't work?
But it did not work.
It could not get value for $result
Just check the results of unlink() and opendir().