I’m having this very weird where i’m using rmtree(“C:\myfolder”); and it’s throwing some kind of exception but it is doing what it is supposed to.
I have this enclosed in
eval {
rmtree("C:\myfolder");
};
if($@) {
print $@;
}
If the folder exists I get an exception thrown eventhough the folder is succesfully deleted. The thrown exception is blank nothing at all. I even tried setting rmtree(“C:\myfolder”, {verbose => 1}) in rmtree but same thing.
My current hack is to do
eval {
eval {
rmtree("C:\myfolder");
};
};
if($@) {
print $@;
}
How can you detect a blank exception??
From perldocs:
In Windows, I know that relative paths work with
/. I think absolute paths work with/too!